Trait remoc::rtc::ServerRefMut

source ·
pub trait ServerRefMut<'target, Target, Codec>: ServerBasewhere
    Self: Sized,{
    // Required methods
    fn new(
        target: &'target mut Target,
        request_buffer: usize
    ) -> (Self, Self::Client);
    fn serve<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
       where Self: 'async_trait;
}
Available on crate feature rtc only.
Expand description

A server of a remotable trait taking the target object by mutable reference.

Required Methods§

source

fn new( target: &'target mut Target, request_buffer: usize ) -> (Self, Self::Client)

Creates a new server instance for the target object.

source

fn serve<'async_trait>(self) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>where Self: 'async_trait,

Serves the target object.

Serving ends when the client is dropped.

Implementors§