pub struct Private { /* private fields */ }Expand description
The private key type.
Implementations§
Source§impl Private
impl Private
Sourcepub fn expose<R>(&self, f: impl for<'a> FnOnce(&'a Scalar) -> R) -> R
pub fn expose<R>(&self, f: impl for<'a> FnOnce(&'a Scalar) -> R) -> R
Temporarily exposes the inner scalar to a closure.
See Secret::expose for more details.
Sourcepub fn expose_unwrap(self) -> Scalar
pub fn expose_unwrap(self) -> Scalar
Consumes the private key and returns the inner scalar.
See Secret::expose_unwrap for more details.
Trait Implementations§
Source§impl From<Private> for PrivateKey
impl From<Private> for PrivateKey
Source§impl Random for Private
impl Random for Private
Source§fn random(rng: impl CryptoRngCore) -> Self
fn random(rng: impl CryptoRngCore) -> Self
Sample an object uniformly at random.
Source§impl Read for Private
impl Read for Private
impl Eq for Private
impl StructuralPartialEq for Private
Auto Trait Implementations§
impl Freeze for Private
impl RefUnwindSafe for Private
impl Send for Private
impl Sync for Private
impl Unpin for Private
impl UnwindSafe for Private
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> EncodeFixed for T
impl<T> EncodeFixed for T
Source§impl<T> EncodeSize for Twhere
T: FixedSize,
impl<T> EncodeSize for Twhere
T: FixedSize,
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
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