pub struct GlobalRandCtx(/* private fields */);Expand description
A borrowed handle to one of the process-wide global DRBGs.
Obtained from RandCtx::public or RandCtx::private_global.
Does not implement Clone or Drop — the global DRBG is owned by the
OpenSSL runtime and must not be freed through this handle. Implements
Deref<Target = RandCtx> so all read-only RandCtx operations are available,
and as_rand_ctx() provides a &RandCtx to pass as a parent to RandCtx::new.
Implementations§
Source§impl GlobalRandCtx
impl GlobalRandCtx
Sourcepub fn as_rand_ctx(&self) -> &RandCtx
pub fn as_rand_ctx(&self) -> &RandCtx
Borrow as &RandCtx for use as the parent argument in RandCtx::new.
Methods from Deref<Target = RandCtx>§
Sourcepub fn state(&self) -> RandState
pub fn state(&self) -> RandState
Current lifecycle state of this DRBG context.
Returns RandState::Ready after a successful Self::instantiate.
Trait Implementations§
Source§impl Deref for GlobalRandCtx
Available on ossl320 only.
impl Deref for GlobalRandCtx
Available on
ossl320 only.impl Send for GlobalRandCtx
Available on
ossl320 only.Auto Trait Implementations§
impl Freeze for GlobalRandCtx
impl RefUnwindSafe for GlobalRandCtx
impl Sync for GlobalRandCtx
impl Unpin for GlobalRandCtx
impl UnwindSafe for GlobalRandCtx
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more