pub struct Fingerprint(/* private fields */);Expand description
Fingerprint of a public key.
Implementations§
Source§impl Fingerprint
impl Fingerprint
Sourcepub fn read(home: &Home) -> Result<Option<Fingerprint>, Error>
pub fn read(home: &Home) -> Result<Option<Fingerprint>, Error>
Return fingerprint of the node, if it exists.
Sourcepub fn init(
home: &Home,
secret_key: &impl Deref<Target = SecretKey>,
) -> Result<(), Error>
pub fn init( home: &Home, secret_key: &impl Deref<Target = SecretKey>, ) -> Result<(), Error>
Initialize the fingerprint of the node with given public key.
Sourcepub fn verify(
&self,
secret_key: &impl Deref<Target = SecretKey>,
) -> FingerprintVerification
pub fn verify( &self, secret_key: &impl Deref<Target = SecretKey>, ) -> FingerprintVerification
Verify that the fingerprint of given public key matches self.
Trait Implementations§
Source§impl Debug for Fingerprint
impl Debug for Fingerprint
Source§impl Display for Fingerprint
impl Display for Fingerprint
Source§impl PartialEq for Fingerprint
impl PartialEq for Fingerprint
impl StructuralPartialEq for Fingerprint
Auto Trait Implementations§
impl Freeze for Fingerprint
impl RefUnwindSafe for Fingerprint
impl Send for Fingerprint
impl Sync for Fingerprint
impl Unpin for Fingerprint
impl UnwindSafe for Fingerprint
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