[−][src]Struct libp2p_core::topology::MemoryTopology
Topology of the network stored in memory.
Methods
impl MemoryTopology
[src]
impl MemoryTopology
pub fn empty(pubkey: PublicKey) -> MemoryTopology | [src] |
Creates an empty topology.
pub fn is_empty(&self) -> bool | [src] |
Returns true if the topology is empty.
pub fn add_address(&mut self, peer: PeerId, addr: Multiaddr) | [src] |
Adds an address to the topology.
pub fn peers( | [src] |
Returns a list of all the known peers in the topology.
pub fn iter( | [src] |
Returns an iterator to all the entries in the topology.
Trait Implementations
impl Topology for MemoryTopology
[src]
impl Topology for MemoryTopology
fn addresses_of_peer(&mut self, peer: &PeerId) -> Vec<Multiaddr> | [src] |
fn add_local_external_addrs<TIter>(&mut self, addrs: TIter) where | [src] |
fn local_peer_id(&self) -> &PeerId | [src] |
fn local_public_key(&self) -> &PublicKey | [src] |
fn set_connected(&mut self, _peer_id: &PeerId, _addr: &ConnectedPoint) | [src] |
Indicates to the topology that we have successfully connected to the given address with the given PeerId
. Read more
fn set_disconnected( | [src] |
Indicates to the topology that we have been disconnected from the given address with the given PeerId
. Read more
fn set_unreachable(&mut self, _addr: &Multiaddr) | [src] |
Indicates to the topology that we have failed to reach the given address.
Auto Trait Implementations
impl Send for MemoryTopology
impl Send for MemoryTopology
impl Sync for MemoryTopology
impl Sync for MemoryTopology
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self
impl<T> Erased for T
impl<T> Erased for T