pub struct ConnectionInfo<A: NetZoneAddress> {Show 24 fields
pub address: A,
pub address_type: AddressType,
pub avg_download: u64,
pub avg_upload: u64,
pub current_download: u64,
pub current_upload: u64,
pub height: u64,
pub host: String,
pub incoming: bool,
pub live_time: u64,
pub localhost: bool,
pub local_ip: bool,
pub peer_id: u64,
pub pruning_seed: PruningSeed,
pub recv_count: u64,
pub recv_idle_time: u64,
pub rpc_credits_per_hash: u32,
pub rpc_port: u16,
pub send_count: u64,
pub send_idle_time: u64,
pub state: ConnectionState,
pub support_flags: u32,
pub socket_addr: Option<SocketAddr>,
pub connection_id: ConnectionId,
}Expand description
Data within crate::services::AddressBookResponse::ConnectionInfo.
Fields§
§address: A§address_type: AddressType§avg_download: u64§avg_upload: u64§current_download: u64§current_upload: u64§height: u64§host: StringEither a domain or an IP without the port.
incoming: bool§live_time: u64§localhost: bool§local_ip: bool§peer_id: u64§pruning_seed: PruningSeed§recv_count: u64§recv_idle_time: u64§rpc_credits_per_hash: u32§rpc_port: u16§send_count: u64§send_idle_time: u64§state: ConnectionState§support_flags: u32§socket_addr: Option<SocketAddr>None if Tor/i2p or unknown.
connection_id: ConnectionIdThis field does not exist for cuprated’s RPC, this is just a marker type:
- https://github.com/Cuprate/cuprate/pull/320#discussion_r1811335020
- https://github.com/Cuprate/cuprate/pull/320#discussion_r1819826080
ConnectionId::DEFAULT_STR is used when mapping to the RPC type.
Auto Trait Implementations§
impl<A> Freeze for ConnectionInfo<A>where
A: Freeze,
impl<A> RefUnwindSafe for ConnectionInfo<A>where
A: RefUnwindSafe,
impl<A> Send for ConnectionInfo<A>
impl<A> Sync for ConnectionInfo<A>
impl<A> Unpin for ConnectionInfo<A>
impl<A> UnsafeUnpin for ConnectionInfo<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for ConnectionInfo<A>where
A: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.