Trait Node

Source
pub trait Node: Send + Sync {
    // Required methods
    fn id(&self) -> NodeId;
    fn coordinate(&self) -> Result<Coordinate>;
    fn dial<P: Protocol>(
        &self,
    ) -> impl Future<Output = Result<impl Protocol>> + Send + Sync;
}
Expand description

A Node trait

Required Methods§

Source

fn id(&self) -> NodeId

ID, this is a unique identifier for the node.

Source

fn coordinate(&self) -> Result<Coordinate>

Coordinate

Source

fn dial<P: Protocol>( &self, ) -> impl Future<Output = Result<impl Protocol>> + Send + Sync

dial

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§