Struct tor_hscrypto::pk::HsSvcNtorKeypair
source · pub struct HsSvcNtorKeypair { /* private fields */ }
Expand description
A pair of a public and private components for a HsSvcNtorKey
.
Implementations§
source§impl HsSvcNtorKeypair
impl HsSvcNtorKeypair
sourcepub fn new(public: HsSvcNtorKey, secret: HsSvcNtorSecretKey) -> Self
pub fn new(public: HsSvcNtorKey, secret: HsSvcNtorSecretKey) -> Self
Construct this keypair from a public key and a secret key.
sourcepub fn from_secret_key(secret: HsSvcNtorSecretKey) -> Self
pub fn from_secret_key(secret: HsSvcNtorSecretKey) -> Self
Construct this keypair from a secret key.
sourcepub fn public(&self) -> &HsSvcNtorKey
pub fn public(&self) -> &HsSvcNtorKey
Return the public part of this keypair.
sourcepub fn secret(&self) -> &HsSvcNtorSecretKey
pub fn secret(&self) -> &HsSvcNtorSecretKey
Return the secret part of this keypair.
Trait Implementations§
source§impl Debug for HsSvcNtorKeypair
impl Debug for HsSvcNtorKeypair
source§impl From<HsSvcNtorKeypair> for StaticKeypair
impl From<HsSvcNtorKeypair> for StaticKeypair
source§fn from(input: HsSvcNtorKeypair) -> StaticKeypair
fn from(input: HsSvcNtorKeypair) -> StaticKeypair
Converts to this type from the input type.
source§impl From<StaticKeypair> for HsSvcNtorKeypair
impl From<StaticKeypair> for HsSvcNtorKeypair
source§fn from(input: StaticKeypair) -> HsSvcNtorKeypair
fn from(input: StaticKeypair) -> HsSvcNtorKeypair
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HsSvcNtorKeypair
impl RefUnwindSafe for HsSvcNtorKeypair
impl Send for HsSvcNtorKeypair
impl Sync for HsSvcNtorKeypair
impl Unpin for HsSvcNtorKeypair
impl UnwindSafe for HsSvcNtorKeypair
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