#[repr(transparent)]pub struct OwnedFd { /* private fields */ }
Expand description
A wrapper around io_lifetimes::OwnedFd
which closes the file descriptor
using rustix’s own close
rather than libc’s close
.
Implementations§
Trait Implementations§
source§impl AsFd for OwnedFd
impl AsFd for OwnedFd
source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
source§impl FromFd for OwnedFd
impl FromFd for OwnedFd
source§impl FromRawFd for OwnedFd
impl FromRawFd for OwnedFd
source§unsafe fn from_raw_fd(raw_fd: RawFd) -> Self
unsafe fn from_raw_fd(raw_fd: RawFd) -> Self
Constructs a new instance of
Self
from the given raw file
descriptor. Read moreAuto Trait Implementations§
impl RefUnwindSafe for OwnedFd
impl Send for OwnedFd
impl Sync for OwnedFd
impl Unpin for OwnedFd
impl UnwindSafe for OwnedFd
Blanket Implementations§
source§impl<T> AsFilelike for Twhere
T: AsFd,
impl<T> AsFilelike for Twhere
T: AsFd,
source§fn as_filelike(&self) -> BorrowedFd<'_>
fn as_filelike(&self) -> BorrowedFd<'_>
Borrows the reference. Read more
source§fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target>where
Target: FilelikeViewType,
fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target>where
Target: FilelikeViewType,
Return a borrowing view of a resource which dereferences to a
&Target
. Read moresource§impl<T> AsRawFilelike for Twhere
T: AsRawFd,
impl<T> AsRawFilelike for Twhere
T: AsRawFd,
source§fn as_raw_filelike(&self) -> i32
fn as_raw_filelike(&self) -> i32
Returns the raw value.
source§impl<T> AsRawSocketlike for Twhere
T: AsRawFd,
impl<T> AsRawSocketlike for Twhere
T: AsRawFd,
source§fn as_raw_socketlike(&self) -> i32
fn as_raw_socketlike(&self) -> i32
Returns the raw value.
source§impl<T> AsSocketlike for Twhere
T: AsFd,
impl<T> AsSocketlike for Twhere
T: AsFd,
source§fn as_socketlike(&self) -> BorrowedFd<'_>
fn as_socketlike(&self) -> BorrowedFd<'_>
Borrows the reference.
source§fn as_socketlike_view<Target>(&self) -> SocketlikeView<'_, Target>where
Target: SocketlikeViewType,
fn as_socketlike_view<Target>(&self) -> SocketlikeView<'_, Target>where
Target: SocketlikeViewType,
Return a borrowing view of a resource which dereferences to a
&Target
. Read moresource§impl<T> FromFilelike for Twhere
T: FromFd,
impl<T> FromFilelike for Twhere
T: FromFd,
source§fn from_filelike(owned: OwnedFd) -> T
fn from_filelike(owned: OwnedFd) -> T
Constructs a new instance of
Self
from the given filelike object. Read moresource§fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
Constructs a new instance of
Self
from the given filelike object
converted from into_owned
. Read moresource§impl<T> FromRawFilelike for Twhere
T: FromRawFd,
impl<T> FromRawFilelike for Twhere
T: FromRawFd,
source§unsafe fn from_raw_filelike(raw: i32) -> T
unsafe fn from_raw_filelike(raw: i32) -> T
Constructs
Self
from the raw value. Read moresource§impl<T> FromRawSocketlike for Twhere
T: FromRawFd,
impl<T> FromRawSocketlike for Twhere
T: FromRawFd,
source§unsafe fn from_raw_socketlike(raw: i32) -> T
unsafe fn from_raw_socketlike(raw: i32) -> T
Constructs
Self
from the raw value. Read moresource§impl<T> FromSocketlike for Twhere
T: FromFd,
impl<T> FromSocketlike for Twhere
T: FromFd,
source§fn from_socketlike(owned: OwnedFd) -> T
fn from_socketlike(owned: OwnedFd) -> T
Constructs a new instance of
Self
from the given socketlike object.source§fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
Constructs a new instance of
Self
from the given socketlike object
converted from into_owned
. Read moresource§impl<T> IntoFilelike for Twhere
T: IntoFd,
impl<T> IntoFilelike for Twhere
T: IntoFd,
source§fn into_filelike(self) -> OwnedFd
fn into_filelike(self) -> OwnedFd
Consumes this object, returning the underlying filelike object. Read more
source§impl<T> IntoRawFilelike for Twhere
T: IntoRawFd,
impl<T> IntoRawFilelike for Twhere
T: IntoRawFd,
source§fn into_raw_filelike(self) -> i32
fn into_raw_filelike(self) -> i32
Returns the raw value.
source§impl<T> IntoRawSocketlike for Twhere
T: IntoRawFd,
impl<T> IntoRawSocketlike for Twhere
T: IntoRawFd,
source§fn into_raw_socketlike(self) -> i32
fn into_raw_socketlike(self) -> i32
Returns the raw value.
source§impl<T> IntoSocketlike for Twhere
T: IntoFd,
impl<T> IntoSocketlike for Twhere
T: IntoFd,
source§fn into_socketlike(self) -> OwnedFd
fn into_socketlike(self) -> OwnedFd
Consumes this object, returning the underlying socketlike object.