Struct netmod_tcp::Endpoint[][src]

pub struct Endpoint { /* fields omitted */ }

Implementations

impl Endpoint[src]

pub async fn new(
    addr: &str,
    port: u16,
    name: &str,
    mode: Mode
) -> Result<Arc<Self>>
[src]

Create a new endpoint on an interface and port

pub fn mode(&self) -> Mode[src]

Get the current runtime mode

pub async fn stop(&self)[src]

pub async fn add_peers(&self, peers: Vec<String>) -> Result<()>[src]

Insert a set of peers into the routing table

Each peer will spawn a worker that periodically attempts to connect to it. Connections might not be recipricated if the peer doesn’t know the local IP or is rejecting unknown connections.

Trait Implementations

impl Clone for Endpoint[src]

impl Endpoint for Endpoint[src]

Auto Trait Implementations

impl !RefUnwindSafe for Endpoint

impl Send for Endpoint

impl Sync for Endpoint

impl Unpin for Endpoint

impl !UnwindSafe for Endpoint

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]