HostClient

Trait HostClient 

Source
pub trait HostClient: Send {
    // Required methods
    fn connect(
        &mut self,
        name: String,
    ) -> impl Future<Output = Result<Result<Resource<Client>, Error>>> + Send;
    fn disconnect(
        &mut self,
        self_: Resource<Client>,
    ) -> impl Future<Output = Result<Result<(), Error>>> + Send;
    fn drop(
        &mut self,
        rep: Resource<Client>,
    ) -> impl Future<Output = Result<()>> + Send;
}

Required Methods§

Source

fn connect( &mut self, name: String, ) -> impl Future<Output = Result<Result<Resource<Client>, Error>>> + Send

Source

fn disconnect( &mut self, self_: Resource<Client>, ) -> impl Future<Output = Result<Result<(), Error>>> + Send

Source

fn drop( &mut self, rep: Resource<Client>, ) -> impl Future<Output = Result<()>> + Send

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<_T: HostClient + ?Sized + Send> HostClient for &mut _T

Source§

fn connect( &mut self, name: String, ) -> impl Future<Output = Result<Result<Resource<Client>, Error>>> + Send

Source§

fn disconnect( &mut self, self_: Resource<Client>, ) -> impl Future<Output = Result<Result<(), Error>>> + Send

Source§

async fn drop(&mut self, rep: Resource<Client>) -> Result<()>

Implementors§

Source§

impl<H> HostClient for Ctx<H>
where H: Handler,