pub struct Generator { /* private fields */ }
Expand description
TODO(doc): @zhangsoledad
Implementations§
Source§impl Generator
impl Generator
Sourcepub fn non_crypto_safe_prng(seed: u64) -> Generator
pub fn non_crypto_safe_prng(seed: u64) -> Generator
Non crypto safe prng, should only used in tests
Sourcepub fn gen_privkey(&mut self) -> Privkey
pub fn gen_privkey(&mut self) -> Privkey
TODO(doc): @zhangsoledad
Sourcepub fn gen_keypair(&mut self) -> (Privkey, Pubkey)
pub fn gen_keypair(&mut self) -> (Privkey, Pubkey)
TODO(doc): @zhangsoledad
Sourcepub fn random_privkey() -> Privkey
pub fn random_privkey() -> Privkey
TODO(doc): @zhangsoledad
Sourcepub fn random_keypair() -> (Privkey, Pubkey)
pub fn random_keypair() -> (Privkey, Pubkey)
TODO(doc): @zhangsoledad
Sourcepub fn random_secret_key() -> SecretKey
pub fn random_secret_key() -> SecretKey
TODO(doc): @zhangsoledad
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Generator
impl !RefUnwindSafe for Generator
impl !Send for Generator
impl !Sync for Generator
impl Unpin for Generator
impl !UnwindSafe for Generator
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more