Skip to main content

Connection

Trait Connection 

Source
pub trait Connection: Send {
    // Required methods
    fn send(&mut self, data: &[u8]) -> Result<Vec<u8>>;
    fn close(&mut self) -> Result<()>;
    fn is_alive(&self) -> bool;
}

Required Methods§

Source

fn send(&mut self, data: &[u8]) -> Result<Vec<u8>>

Source

fn close(&mut self) -> Result<()>

Source

fn is_alive(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§