Skip to main content

PeerInfo

Struct PeerInfo 

Source
pub struct PeerInfo {
Show 22 fields pub addr: SocketAddr, pub client: String, pub peer_choking: bool, pub peer_interested: bool, pub am_choking: bool, pub am_interested: bool, pub download_rate: u64, pub upload_rate: u64, pub num_pieces: u32, pub source: PeerSource, pub supports_fast: bool, pub upload_only: bool, pub snubbed: bool, pub connected_duration_secs: u64, pub num_pending_requests: usize, pub num_incoming_requests: usize, pub is_optimistic: bool, pub is_encrypted: bool, pub uses_utp: bool, pub uses_holepunch: bool, pub in_flight_requests: u32, pub target_pipeline_depth: u32,
}
Expand description

Per-peer details exported for client UI introspection.

Fields§

§addr: SocketAddr

Remote peer address (IP + port).

§client: String

Client identification string (from extension handshake v field, or empty).

§peer_choking: bool

Whether the peer is choking us.

§peer_interested: bool

Whether the peer is interested in our data.

§am_choking: bool

Whether we are choking the peer.

§am_interested: bool

Whether we are interested in the peer’s data.

§download_rate: u64

Current download rate from this peer in bytes/sec.

§upload_rate: u64

Current upload rate to this peer in bytes/sec.

§num_pieces: u32

Number of pieces the peer has (bitfield population count).

§source: PeerSource

How the peer was discovered.

§supports_fast: bool

Whether the peer supports BEP 6 Fast Extension.

§upload_only: bool

Whether the peer declared upload-only status (BEP 21).

§snubbed: bool

Whether the peer is snubbed (no data for snub_timeout_secs).

§connected_duration_secs: u64

Seconds since the peer connection was established.

§num_pending_requests: usize

Number of outstanding piece requests to this peer.

§num_incoming_requests: usize

Number of incoming piece requests from this peer.

§is_optimistic: bool

Whether the peer currently holds our optimistic-unchoke slot (M171 D5; maps to the O peer-flag glyph). Not yet wired from the choker — placeholder for the superset renderer.

§is_encrypted: bool

Whether the peer connection is encrypted via BEP 8 MSE/PE (M171 D5; maps to E glyph). Not yet wired from the handshake state — placeholder for the superset renderer.

§uses_utp: bool

Whether the peer connection uses BEP 29 uTP (not raw TCP) (M171 D5; maps to P glyph).

§uses_holepunch: bool

Whether the peer advertised BEP 55 holepunch support during the extended handshake (M171 D5; tracked for observability — no qBt glyph is assigned to holepunch).

§in_flight_requests: u32

M187: current number of in-flight block requests to this peer.

§target_pipeline_depth: u32

M187: current target pipeline depth for this peer.

Trait Implementations§

Source§

impl Clone for PeerInfo

Source§

fn clone(&self) -> PeerInfo

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PeerInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PeerInfo

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PeerInfo

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,