Struct backroll_transport::Peers[][src]

pub struct Peers<T>(_)
where
    T: Eq + Hash
;
Expand description

A keyed mapping of Peers with ownership semantics.

Dropping will disconnect all owned peers.

Implementations

Gets a Peer by it’s ID, if available.

Gets the number of active connections managed by it.

Checks if the store has a connection to the given ID.

Creates a new unbounded peer pair and stores one end, mapping it to the provided ID, returning the other end.

If a peer was previous stored at the given ID, it will be replaced and disconnected.

Creates an bounded peer pair and stores one end, mapping it to the provided ID, returning the other end.

If a peer was previous stored at the given ID, it will be dropped and replaced.

Disconnects and removes a connection by it’s ID

A no-op if there no Peer with the given ID.

Removes all peers that are disconnected.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.