Struct cros_asyncv2::sys::descriptor::Descriptor
source · [−]pub struct Descriptor(Arc<SafeDescriptor>);
Expand description
An async version of SafeDescriptor.
Tuple Fields
0: Arc<SafeDescriptor>
Implementations
sourceimpl Descriptor
impl Descriptor
sourcepub fn new(fd: SafeDescriptor) -> Result<Descriptor>
pub fn new(fd: SafeDescriptor) -> Result<Descriptor>
Creates a new AsyncDescriptor
in a nonblocking state.
sourcepub async fn wait_readable(&self) -> Result<()>
pub async fn wait_readable(&self) -> Result<()>
Waits for self
to become readable. This function is edge-triggered rather than
level-triggered so callers should make sure that the underlying descriptor has been fully
drained before calling this method.
sourcepub async fn wait_writable(&self) -> Result<()>
pub async fn wait_writable(&self) -> Result<()>
Waits for self
to become writable. This function is edge-triggered rather than
level-triggered so callers should make sure that the underlying descriptor is actually full
before calling this method.
Auto Trait Implementations
impl RefUnwindSafe for Descriptor
impl Send for Descriptor
impl Sync for Descriptor
impl Unpin for Descriptor
impl UnwindSafe for Descriptor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more