pub trait SocketExtManual: Sized {
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 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>>;
}