pub struct RawDescriptor(/* private fields */);Expand description
A descriptor the caller already owns and has asked us to write to.
Deliberately opaque. Callers hold host-specific things – a RawFd on
Unix, a RawHandle on Windows – and there is no honest neutral spelling
for what they hold, so the conversion into this type is host-specific
and stays at the caller’s edge. What is not host-specific is everything
after: writing all of a buffer to it, retrying the partial writes and the
interruptions that every host has in its own dialect.
This borrows. It does not close the descriptor, and it does not extend its lifetime: the caller who opened it still decides when it goes away, and using this after that is the same mistake as using the raw value would be.
Trait Implementations§
Source§impl Clone for RawDescriptor
impl Clone for RawDescriptor
Source§fn clone(&self) -> RawDescriptor
fn clone(&self) -> RawDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RawDescriptor
Source§impl Debug for RawDescriptor
impl Debug for RawDescriptor
impl Eq for RawDescriptor
Source§impl From<i32> for RawDescriptor
impl From<i32> for RawDescriptor
Source§impl PartialEq for RawDescriptor
impl PartialEq for RawDescriptor
impl StructuralPartialEq for RawDescriptor
Auto Trait Implementations§
impl Freeze for RawDescriptor
impl RefUnwindSafe for RawDescriptor
impl Send for RawDescriptor
impl Sync for RawDescriptor
impl Unpin for RawDescriptor
impl UnsafeUnpin for RawDescriptor
impl UnwindSafe for RawDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more