Struct libp2p_pnet::PreSharedKey [−][src]
pub struct PreSharedKey(_);
Expand description
A pre-shared key, consisting of 32 bytes of random data.
Implementations
impl PreSharedKey[src]
impl PreSharedKey[src]pub fn fingerprint(&self) -> Fingerprint[src]
pub fn fingerprint(&self) -> Fingerprint[src]Compute PreSharedKey fingerprint identical to the go-libp2p fingerprint. The computation of the fingerprint is not specified in the spec.
This provides a way to check that private keys are properly configured without dumping the key itself to the console.
Trait Implementations
impl Clone for PreSharedKey[src]
impl Clone for PreSharedKey[src]fn clone(&self) -> PreSharedKey[src]
fn clone(&self) -> PreSharedKey[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for PreSharedKey[src]
impl Debug for PreSharedKey[src]impl Display for PreSharedKey[src]
impl Display for PreSharedKey[src]Dumps a PreSharedKey in key file format compatible with go-libp2p
impl FromStr for PreSharedKey[src]
impl FromStr for PreSharedKey[src]Parses a PreSharedKey from a key file
currently supports only base16 encoding.
impl PartialEq<PreSharedKey> for PreSharedKey[src]
impl PartialEq<PreSharedKey> for PreSharedKey[src]fn eq(&self, other: &PreSharedKey) -> bool[src]
fn eq(&self, other: &PreSharedKey) -> bool[src]This method tests for self and other values to be equal, and is used
by ==. Read more
fn ne(&self, other: &PreSharedKey) -> bool[src]
fn ne(&self, other: &PreSharedKey) -> bool[src]This method tests for !=.
impl Copy for PreSharedKey[src]
impl Eq for PreSharedKey[src]
impl StructuralEq for PreSharedKey[src]
impl StructuralPartialEq for PreSharedKey[src]
Auto Trait Implementations
impl RefUnwindSafe for PreSharedKey
impl Send for PreSharedKey
impl Sync for PreSharedKey
impl Unpin for PreSharedKey
impl UnwindSafe for PreSharedKey
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,