Struct rustix::io::OwnedFd

#[repr(transparent)]
pub struct OwnedFd { /* fields hidden */ }
Documentation

A wrapper around io_lifetimes::OwnedFd which closes the file descriptor using rustix’s own close rather than libc’s close.

Trait Implementations

impl AsFd for OwnedFd
fn as_fd(&Self) -> BorrowedFd<'_>
impl AsRawFd for OwnedFd
fn as_raw_fd(&Self) -> RawFd
impl Debug for OwnedFd
fn fmt(&Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Drop for OwnedFd
fn drop(&mut Self)
impl<'context, T: AsFd + IntoFd + FromFd> From<Epoll<Owning<'context, T>>> for OwnedFd
fn from(epoll: Epoll<Owning<'context, T>>) -> OwnedFd
impl<'context, T: AsFd + IntoFd + FromFd> From<OwnedFd> for Epoll<Owning<'context, T>>
fn from(fd: OwnedFd) -> Self
impl From<OwnedFd> for OwnedFd
fn from(fd: crate::imp::fd::OwnedFd) -> Self
impl From<OwnedFd> for crate::imp::fd::OwnedFd
fn from(fd: OwnedFd) -> Self
impl FromFd for OwnedFd
fn from_fd(owned_fd: crate::imp::fd::OwnedFd) -> Self
impl FromRawFd for OwnedFd
unsafe fn from_raw_fd(raw_fd: RawFd) -> Self
impl IntoFd for OwnedFd
fn into_fd(Self) -> crate::imp::fd::OwnedFd
impl IntoRawFd for OwnedFd
fn into_raw_fd(Self) -> RawFd

Auto Trait Implementations

impl Send for OwnedFd
impl Sync for OwnedFd
impl Unpin for OwnedFd
impl UnwindSafe for OwnedFd

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> AsFilelike for T
where
    T: AsFd,
fn as_filelike(&Self) -> BorrowedFd<'_>
fn as_filelike_view<Target>(&Self) -> FilelikeView<'_, Target>
where
    Target: FromFilelike + IntoFilelike
impl<T> AsRawFilelike for T
where
    T: AsRawFd,
fn as_raw_filelike(&Self) -> i32
impl<T> AsRawSocketlike for T
where
    T: AsRawFd,
fn as_raw_socketlike(&Self) -> i32
impl<T> AsSocketlike for T
where
    T: AsFd,
fn as_socketlike(&Self) -> BorrowedFd<'_>
fn as_socketlike_view<Target>(&Self) -> FilelikeView<'_, Target>
where
    Target: FromSocketlike + IntoSocketlike
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FromFilelike for T
where
    T: FromFd,
fn from_filelike(owned: OwnedFd) -> T
fn from_into_filelike<Owned>(owned: Owned) -> T
where
    Owned: IntoFilelike
impl<T> FromRawFilelike for T
where
    T: FromRawFd,
unsafe fn from_raw_filelike(raw: i32) -> T
impl<T> FromRawSocketlike for T
where
    T: FromRawFd,
unsafe fn from_raw_socketlike(raw: i32) -> T
impl<T> FromSocketlike for T
where
    T: FromFd,
fn from_socketlike(owned: OwnedFd) -> T
fn from_into_socketlike<Owned>(owned: Owned) -> T
where
    Owned: IntoSocketlike
impl<T, U> Into<U> for T
where
    U: From<T>,
fn into(Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl<T> IntoFilelike for T
where
    T: IntoFd,
fn into_filelike(Self) -> OwnedFd
impl<T> IntoRawFilelike for T
where
    T: IntoRawFd,
fn into_raw_filelike(Self) -> i32
impl<T> IntoSocketlike for T
where
    T: IntoFd,
fn into_socketlike(Self) -> OwnedFd
impl<T, U> TryFrom<U> for T
where
    U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>