pub struct PeerState {
pub version: u32,
pub services: u64,
pub user_agent: String,
pub start_height: i32,
pub handshake_complete: bool,
pub known_addresses: Vec<NetworkAddress>,
pub ping_nonce: Option<u64>,
pub last_pong: Option<SystemTime>,
pub min_fee_rate: Option<u64>,
pub v2_transport: Option<Arc<V2Transport>>,
pub v2_handshake: Option<Arc<V2Handshake>>,
}Expand description
Peer connection state
Fields§
§version: u32§services: u64§user_agent: String§start_height: i32§handshake_complete: bool§known_addresses: Vec<NetworkAddress>§ping_nonce: Option<u64>§last_pong: Option<SystemTime>§min_fee_rate: Option<u64>§v2_transport: Option<Arc<V2Transport>>BIP324: v2 encrypted transport state (if enabled)
Note: V2Transport is not Clone, so we use Option<Box
v2_handshake: Option<Arc<V2Handshake>>BIP324: Whether v2 transport handshake is in progress
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerState
impl RefUnwindSafe for PeerState
impl Send for PeerState
impl Sync for PeerState
impl Unpin for PeerState
impl UnsafeUnpin for PeerState
impl UnwindSafe for PeerState
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> 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