Struct mapped_file::file::memory::MemoryFile
source · [−]#[repr(transparent)]pub struct MemoryFile(_);
Expand description
A physical-memory backed file
Implementations
sourceimpl MemoryFile
impl MemoryFile
pub fn resize(&mut self, value: usize) -> Result<()>
pub fn with_hugetlb(hugetlb: MapHugeFlag) -> Result<Self>
pub fn with_size(size: usize) -> Result<Self>
pub fn with_size_hugetlb(size: usize, hugetlb: MapHugeFlag) -> Result<Self>
Trait Implementations
sourceimpl AsRawFd for MemoryFile
impl AsRawFd for MemoryFile
sourceimpl Borrow<MemoryFile> for NamedMemoryFile
impl Borrow<MemoryFile> for NamedMemoryFile
sourcefn borrow(&self) -> &MemoryFile
fn borrow(&self) -> &MemoryFile
Immutably borrows from an owned value. Read more
sourceimpl BorrowMut<MemoryFile> for NamedMemoryFile
impl BorrowMut<MemoryFile> for NamedMemoryFile
sourcefn borrow_mut(&mut self) -> &mut MemoryFile
fn borrow_mut(&mut self) -> &mut MemoryFile
Mutably borrows from an owned value. Read more
sourceimpl Clone for MemoryFile
impl Clone for MemoryFile
sourcefn clone(&self) -> MemoryFile
fn clone(&self) -> MemoryFile
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MemoryFile
impl Debug for MemoryFile
sourceimpl From<MemoryFile> for File
impl From<MemoryFile> for File
sourcefn from(from: MemoryFile) -> Self
fn from(from: MemoryFile) -> Self
Converts to this type from the input type.
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 FromRawFd for MemoryFile
impl FromRawFd for MemoryFile
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 Hash for MemoryFile
impl Hash for MemoryFile
sourceimpl IntoRawFd for MemoryFile
impl IntoRawFd for MemoryFile
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 MemoryFile
impl Ord for MemoryFile
sourcefn cmp(&self, other: &MemoryFile) -> Ordering
fn cmp(&self, other: &MemoryFile) -> Ordering
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 PartialEq<MemoryFile> for MemoryFile
impl PartialEq<MemoryFile> for MemoryFile
sourcefn eq(&self, other: &MemoryFile) -> bool
fn eq(&self, other: &MemoryFile) -> bool
sourceimpl PartialOrd<MemoryFile> for MemoryFile
impl PartialOrd<MemoryFile> for MemoryFile
sourcefn partial_cmp(&self, other: &MemoryFile) -> Option<Ordering>
fn partial_cmp(&self, other: &MemoryFile) -> 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 MemoryFile
impl StructuralEq for MemoryFile
impl StructuralPartialEq for MemoryFile
Auto Trait Implementations
impl RefUnwindSafe for MemoryFile
impl Send for MemoryFile
impl Sync for MemoryFile
impl Unpin for MemoryFile
impl UnwindSafe for MemoryFile
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