Skip to main content

AsSocketState

Trait AsSocketState 

Source
pub trait AsSocketState: AsFd {
    // Provided methods
    fn recv_poll_first(&self) -> bool { ... }
    fn accept_poll_first(&self) -> bool { ... }
    fn set_recv(&self, extra: &Extra) { ... }
    fn set_accept(&self, extra: &Extra) { ... }
}
Expand description

Per-socket state needed by the asynchronous operations.

Provided Methods§

Source

fn recv_poll_first(&self) -> bool

Whether the socket is known to be empty, so that a receive should arm poll before its first attempt.

Source

fn accept_poll_first(&self) -> bool

Same as AsSocketState::recv_poll_first, for accept.

Source

fn set_recv(&self, extra: &Extra)

Update the state from a receive completion.

Source

fn set_accept(&self, extra: &Extra)

Same as AsSocketState::set_recv, for accept.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§