Trait SocketExtManual

Source
pub trait SocketExtManual: Sized {
    // Required methods
    fn receive<B: AsMut<[u8]>>(
        &self,
        buffer: B,
        cancellable: Option<&Cancellable>,
    ) -> Result<usize, Error>;
    fn receive_from<B: AsMut<[u8]>>(
        &self,
        buffer: B,
        cancellable: Option<&Cancellable>,
    ) -> Result<(usize, SocketAddress), Error>;
    fn receive_with_blocking<B: AsMut<[u8]>>(
        &self,
        buffer: B,
        blocking: bool,
        cancellable: Option<&Cancellable>,
    ) -> Result<usize, Error>;
    fn send<B: AsRef<[u8]>>(
        &self,
        buffer: B,
        cancellable: Option<&Cancellable>,
    ) -> Result<usize, Error>;
    fn send_to<B: AsRef<[u8]>, P: IsA<SocketAddress>>(
        &self,
        address: Option<&P>,
        buffer: B,
        cancellable: Option<&Cancellable>,
    ) -> Result<usize, Error>;
    fn send_with_blocking<B: AsRef<[u8]>>(
        &self,
        buffer: B,
        blocking: bool,
        cancellable: Option<&Cancellable>,
    ) -> Result<usize, Error>;
    fn get_fd<T: FromRawFd>(&self) -> T;
    fn create_source<F>(
        &self,
        condition: IOCondition,
        cancellable: Option<&Cancellable>,
        name: Option<&str>,
        priority: Priority,
        func: F,
    ) -> Source
       where F: FnMut(&Self, IOCondition) -> Continue + 'static;
}

Required Methods§

Source

fn receive<B: AsMut<[u8]>>( &self, buffer: B, cancellable: Option<&Cancellable>, ) -> Result<usize, Error>

Source

fn receive_from<B: AsMut<[u8]>>( &self, buffer: B, cancellable: Option<&Cancellable>, ) -> Result<(usize, SocketAddress), Error>

Source

fn receive_with_blocking<B: AsMut<[u8]>>( &self, buffer: B, blocking: bool, cancellable: Option<&Cancellable>, ) -> Result<usize, Error>

Source

fn send<B: AsRef<[u8]>>( &self, buffer: B, cancellable: Option<&Cancellable>, ) -> Result<usize, Error>

Source

fn send_to<B: AsRef<[u8]>, P: IsA<SocketAddress>>( &self, address: Option<&P>, buffer: B, cancellable: Option<&Cancellable>, ) -> Result<usize, Error>

Source

fn send_with_blocking<B: AsRef<[u8]>>( &self, buffer: B, blocking: bool, cancellable: Option<&Cancellable>, ) -> Result<usize, Error>

Source

fn get_fd<T: FromRawFd>(&self) -> T

Source

fn create_source<F>( &self, condition: IOCondition, cancellable: Option<&Cancellable>, name: Option<&str>, priority: Priority, func: F, ) -> Source
where F: FnMut(&Self, IOCondition) -> Continue + 'static,

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§