Struct RandomBytes
pub struct RandomBytes { /* private fields */ }
Expand description
An implementation of EntropySource
using ChaCha20.
Implementations§
§impl RandomBytes
impl RandomBytes
pub fn new(seed: [u8; 32]) -> RandomBytes
pub fn new(seed: [u8; 32]) -> RandomBytes
Creates a new instance using the given seed.
Trait Implementations§
§impl Debug for RandomBytes
impl Debug for RandomBytes
§impl EntropySource for RandomBytes
impl EntropySource for RandomBytes
§fn get_secure_random_bytes(&self) -> [u8; 32]
fn get_secure_random_bytes(&self) -> [u8; 32]
Gets a unique, cryptographically-secure, random 32-byte value. This method must return a
different value each time it is called.
Auto Trait Implementations§
impl !Freeze for RandomBytes
impl RefUnwindSafe for RandomBytes
impl Send for RandomBytes
impl Sync for RandomBytes
impl Unpin for RandomBytes
impl UnwindSafe for RandomBytes
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request