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

Required Methods§

source

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

source

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

source

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

source

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

source

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

source

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

source

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

Available on Unix only.
source

fn socket<T: FromRawSocket>(&self) -> T

Available on Windows only.
source

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

source

fn create_source_future<C: IsA<Cancellable>>( &self, condition: IOCondition, cancellable: Option<&C>, priority: Priority ) -> Pin<Box<dyn Future<Output = IOCondition> + 'static>>

source

fn create_source_stream<C: IsA<Cancellable>>( &self, condition: IOCondition, cancellable: Option<&C>, priority: Priority ) -> Pin<Box<dyn Stream<Item = IOCondition> + 'static>>

Implementors§