iroh_n0des

Trait N0de

Source
pub trait N0de: 'static + Send {
    // Required methods
    fn spawn(endpoint: Endpoint) -> impl Future<Output = Result<Self>> + Send
       where Self: Sized;
    fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send;
}
Expand description

A trait for nodes that can be spawned and shut down

Required Methods§

Source

fn spawn(endpoint: Endpoint) -> impl Future<Output = Result<Self>> + Send
where Self: Sized,

Source

fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send

Asynchronously shut down the node

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§