Trait twizzler_async::AsyncDuplexSetup
source · pub trait AsyncDuplexSetup {
type ReadError: PartialEq;
type WriteError: PartialEq;
const READ_WOULD_BLOCK: Self::ReadError;
const WRITE_WOULD_BLOCK: Self::WriteError;
// Required methods
fn setup_read_sleep(&self) -> ThreadSyncSleep;
fn setup_write_sleep(&self) -> ThreadSyncSleep;
}
Expand description
Implement setting up externally signaled asynchronous events for the async runner to wait for, in the case where there is a duplex mode for reading and writing to this object, each of which could fail with some “would block” error.
Required Associated Types§
sourcetype WriteError: PartialEq
type WriteError: PartialEq
The error type returned by write operations.
Required Associated Constants§
sourceconst READ_WOULD_BLOCK: Self::ReadError
const READ_WOULD_BLOCK: Self::ReadError
The specific variant of the error type that indicates that a read operation would block.
sourceconst WRITE_WOULD_BLOCK: Self::WriteError
const WRITE_WOULD_BLOCK: Self::WriteError
The specific variant of the error type that indicates that a write operation would block.
Required Methods§
sourcefn setup_read_sleep(&self) -> ThreadSyncSleep
fn setup_read_sleep(&self) -> ThreadSyncSleep
Return a thread sync sleep operation specification for reading from this handle.
sourcefn setup_write_sleep(&self) -> ThreadSyncSleep
fn setup_write_sleep(&self) -> ThreadSyncSleep
Return a thread sync sleep operation specification for writing to this handle.