[][src]Struct nimiq_network::address::peer_address_state::PeerAddressInfo

pub struct PeerAddressInfo {
    pub peer_address: Arc<PeerAddress>,
    pub state: PeerAddressState,
    pub signal_router: SignalRouter,
    pub last_connected: Option<SystemTime>,
    pub failed_attempts: u32,
    pub banned_until: Option<Instant>,
    pub ban_backoff: Duration,
    pub close_types: HashMap<CloseType, usize>,
    pub added_by: HashSet<Arc<NetAddress>>,
}

Fields

peer_address: Arc<PeerAddress>state: PeerAddressStatesignal_router: SignalRouterlast_connected: Option<SystemTime>failed_attempts: u32banned_until: Option<Instant>ban_backoff: Durationclose_types: HashMap<CloseType, usize>added_by: HashSet<Arc<NetAddress>>

Methods

impl PeerAddressInfo[src]

pub fn new(peer_address: Arc<PeerAddress>) -> Self[src]

pub fn max_failed_attempts(&self) -> u32[src]

pub fn close(&mut self, ty: CloseType)[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for T[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<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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