pub struct PeerAddress(/* private fields */);Expand description
Peer overlay address (32 bytes).
Implementations§
Source§impl PeerAddress
impl PeerAddress
Sourcepub fn new(b: &[u8]) -> Result<Self, Error>
pub fn new(b: &[u8]) -> Result<Self, Error>
Construct a PeerAddress from bytes. Returns
Error::LengthMismatch if b.len() does not match.
Sourcepub fn into_array(self) -> [u8; 32]
pub fn into_array(self) -> [u8; 32]
Consume into the inner array.
Trait Implementations§
Source§impl Clone for PeerAddress
impl Clone for PeerAddress
Source§fn clone(&self) -> PeerAddress
fn clone(&self) -> PeerAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeerAddress
impl Debug for PeerAddress
Source§impl<'de> Deserialize<'de> for PeerAddress
impl<'de> Deserialize<'de> for PeerAddress
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PeerAddress
impl Display for PeerAddress
Source§impl FromStr for PeerAddress
impl FromStr for PeerAddress
Source§impl Hash for PeerAddress
impl Hash for PeerAddress
Source§impl LowerHex for PeerAddress
impl LowerHex for PeerAddress
Source§impl PartialEq for PeerAddress
impl PartialEq for PeerAddress
Source§fn eq(&self, other: &PeerAddress) -> bool
fn eq(&self, other: &PeerAddress) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PeerAddress
impl Serialize for PeerAddress
impl Copy for PeerAddress
impl Eq for PeerAddress
impl StructuralPartialEq for PeerAddress
Auto Trait Implementations§
impl Freeze for PeerAddress
impl RefUnwindSafe for PeerAddress
impl Send for PeerAddress
impl Sync for PeerAddress
impl Unpin for PeerAddress
impl UnsafeUnpin for PeerAddress
impl UnwindSafe for PeerAddress
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.