Struct bird_protocol_server::connection::Connection
source · [−]pub struct Connection { /* private fields */ }
Implementations
sourceimpl Connection
impl Connection
pub fn get_addr(&self) -> SocketAddr
pub fn set_addr(&mut self, addr: SocketAddr)
pub async fn close(&self) -> Result<(), CustomError>
pub async fn write_raw_bytes(&self, bytes: Vec<u8>) -> Result<(), CustomError>
pub async fn write_bytes(&self, bytes: Vec<u8>) -> PacketWritableResult
pub async fn write_object<T: PacketWritable>(
&self,
object: T
) -> PacketWritableResult
Auto Trait Implementations
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more