embedded_svc::ws::asynch::server

Trait Acceptor

Source
pub trait Acceptor: ErrorType {
    type Sender<'a>: Sender<Error = Self::Error>
       where Self: 'a;
    type Receiver<'a>: Receiver<Error = Self::Error>
       where Self: 'a;

    // Required method
    async fn accept(
        &self,
    ) -> Result<(Self::Sender<'_>, Self::Receiver<'_>), Self::Error>;
}

Required Associated Types§

Source

type Sender<'a>: Sender<Error = Self::Error> where Self: 'a

Source

type Receiver<'a>: Receiver<Error = Self::Error> where Self: 'a

Required Methods§

Source

async fn accept( &self, ) -> Result<(Self::Sender<'_>, Self::Receiver<'_>), Self::Error>

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.

Implementations on Foreign Types§

Source§

impl<A> Acceptor for &A
where A: Acceptor,

Source§

type Sender<'a> = <A as Acceptor>::Sender<'a> where Self: 'a

Source§

type Receiver<'a> = <A as Acceptor>::Receiver<'a> where Self: 'a

Source§

async fn accept( &self, ) -> Result<(Self::Sender<'_>, Self::Receiver<'_>), Self::Error>

Source§

impl<A> Acceptor for &mut A
where A: Acceptor,

Source§

type Sender<'a> = <A as Acceptor>::Sender<'a> where Self: 'a

Source§

type Receiver<'a> = <A as Acceptor>::Receiver<'a> where Self: 'a

Source§

async fn accept( &self, ) -> Result<(Self::Sender<'_>, Self::Receiver<'_>), Self::Error>

Implementors§