CliServ

Trait CliServ 

Source
pub trait CliServ:
    Sized
    + Send
    + Default {
    // Required methods
    fn is_client() -> bool;
    fn dispatch_into_event<'a, 'g>(
        runner: &'g mut Runner<'a, Self>,
        disp: DispatchEvent,
    ) -> Result<Event<'g, 'a>>;

    // Provided methods
    fn try_server(&self) -> Option<&Server> { ... }
    fn try_mut_server(&mut self) -> Option<&mut Server> { ... }
    fn try_client(&self) -> Option<&Client> { ... }
    fn try_mut_client(&mut self) -> Option<&mut Client> { ... }
}

Required Methods§

Source

fn is_client() -> bool

Source

fn dispatch_into_event<'a, 'g>( runner: &'g mut Runner<'a, Self>, disp: DispatchEvent, ) -> Result<Event<'g, 'a>>

Provided Methods§

Source

fn try_server(&self) -> Option<&Server>

Source

fn try_mut_server(&mut self) -> Option<&mut Server>

Source

fn try_client(&self) -> Option<&Client>

Source

fn try_mut_client(&mut self) -> Option<&mut Client>

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§