Struct SharedFd
pub struct SharedFd<T>(/* private fields */);Expand description
A shared fd. It is passed to the operations to make sure the fd won’t be closed before the operations complete.
Implementations§
pub unsafe fn new_unchecked(fd: T) -> SharedFd<T>
pub unsafe fn new_unchecked(fd: T) -> SharedFd<T>
pub fn try_unwrap(self) -> Result<T, SharedFd<T>>
pub fn try_unwrap(self) -> Result<T, SharedFd<T>>
Try to take the inner owned fd.
Trait Implementations§
§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Extracts the borrowed fd.
§unsafe fn from_raw_socket(sock: u64) -> SharedFd<T>
unsafe fn from_raw_socket(sock: u64) -> SharedFd<T>
Constructs a new I/O object from the specified raw socket. Read more
Return a cloned
SharedFd.Auto Trait Implementations§
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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