Struct mapped_file::file::ManagedFD
source · [−]#[repr(transparent)]pub struct ManagedFD(_);Implementations
sourceimpl ManagedFD
impl ManagedFD
pub const unsafe fn take_unchecked(fd: RawFd) -> Self
sourcepub fn alias(file: &impl AsRawFd + ?Sized) -> Result<Self>
pub fn alias(file: &impl AsRawFd + ?Sized) -> Result<Self>
Duplicate a file-descriptor, aliasing the open resource for the lifetime of the returned ManagedFD..
pub const fn take_raw(fd: RawFd) -> Self
pub const fn take(fd: UnmanagedFD) -> Self
pub fn detach(self) -> UnmanagedFD
Trait Implementations
sourceimpl From<MemoryFile> for ManagedFD
impl From<MemoryFile> for ManagedFD
sourcefn from(from: MemoryFile) -> Self
fn from(from: MemoryFile) -> Self
Converts to this type from the input type.
sourceimpl From<UnmanagedFD> for ManagedFD
impl From<UnmanagedFD> for ManagedFD
sourcefn from(from: UnmanagedFD) -> Self
fn from(from: UnmanagedFD) -> Self
Converts to this type from the input type.
sourceimpl FromRawFd for ManagedFD
impl FromRawFd for ManagedFD
sourceunsafe fn from_raw_fd(fd: RawFd) -> Self
unsafe fn from_raw_fd(fd: RawFd) -> Self
Constructs a new instance of
Self from the given raw file
descriptor. Read moresourceimpl IntoRawFd for ManagedFD
impl IntoRawFd for ManagedFD
sourcefn into_raw_fd(self) -> RawFd
fn into_raw_fd(self) -> RawFd
Consumes this object, returning the raw underlying file descriptor. Read more
sourceimpl Ord for ManagedFD
impl Ord for ManagedFD
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<ManagedFD> for ManagedFD
impl PartialOrd<ManagedFD> for ManagedFD
sourcefn partial_cmp(&self, other: &ManagedFD) -> Option<Ordering>
fn partial_cmp(&self, other: &ManagedFD) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for ManagedFD
impl StructuralEq for ManagedFD
impl StructuralPartialEq for ManagedFD
Auto Trait Implementations
impl RefUnwindSafe for ManagedFD
impl Send for ManagedFD
impl Sync for ManagedFD
impl Unpin for ManagedFD
impl UnwindSafe for ManagedFD
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