[][src]Struct nimiq_network::peer::Peer

pub struct Peer {
    pub channel: Arc<PeerChannel>,
    pub version: u32,
    pub head_hash: Blake2bHash,
    pub time_offset: i64,
    pub user_agent: Option<String>,
}

Fields

channel: Arc<PeerChannel>version: u32head_hash: Blake2bHashtime_offset: i64user_agent: Option<String>

Methods

impl Peer[src]

pub fn new(
    channel: Arc<PeerChannel>,
    version: u32,
    head_hash: Blake2bHash,
    time_offset: i64,
    user_agent: Option<String>
) -> Self
[src]

pub fn peer_address(&self) -> Arc<PeerAddress>[src]

pub fn net_address(&self) -> Option<Arc<NetAddress>>[src]

Trait Implementations

impl Clone for Peer[src]

impl Eq for Peer[src]

impl PartialEq<Peer> for Peer[src]

impl Display for Peer[src]

impl Debug for Peer[src]

impl Hash for Peer[src]

Auto Trait Implementations

impl Send for Peer

impl Sync for Peer

impl Unpin for Peer

impl !UnwindSafe for Peer

impl !RefUnwindSafe for Peer

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Send + Sync + Clone

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err