Struct mapped_file::file::memory::NamedMemoryFile
source · [−]pub struct NamedMemoryFile(_, _);Expand description
A named, physical-memory backed file
Implementations
sourceimpl NamedMemoryFile
impl NamedMemoryFile
pub fn new(name: impl AsRef<str>) -> Result<Self>
pub fn with_hugetlb(name: impl AsRef<str>, hugetlb: MapHugeFlag) -> Result<Self>
pub fn with_size(name: impl AsRef<str>, size: usize) -> Result<Self>
pub fn with_size_hugetlb(
name: impl AsRef<str>,
size: usize,
hugetlb: MapHugeFlag
) -> Result<Self>
Methods from Deref<Target = MemoryFile>
Trait Implementations
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 NamedMemoryFile
impl Clone for NamedMemoryFile
sourcefn clone(&self) -> NamedMemoryFile
fn clone(&self) -> NamedMemoryFile
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 NamedMemoryFile
impl Debug for NamedMemoryFile
sourceimpl Deref for NamedMemoryFile
impl Deref for NamedMemoryFile
type Target = MemoryFile
type Target = MemoryFile
The resulting type after dereferencing.
sourceimpl DerefMut for NamedMemoryFile
impl DerefMut for NamedMemoryFile
sourceimpl Hash for NamedMemoryFile
impl Hash for NamedMemoryFile
sourceimpl Ord for NamedMemoryFile
impl Ord for NamedMemoryFile
sourcefn cmp(&self, other: &NamedMemoryFile) -> Ordering
fn cmp(&self, other: &NamedMemoryFile) -> 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<NamedMemoryFile> for NamedMemoryFile
impl PartialEq<NamedMemoryFile> for NamedMemoryFile
sourcefn eq(&self, other: &NamedMemoryFile) -> bool
fn eq(&self, other: &NamedMemoryFile) -> bool
sourceimpl PartialOrd<NamedMemoryFile> for NamedMemoryFile
impl PartialOrd<NamedMemoryFile> for NamedMemoryFile
sourcefn partial_cmp(&self, other: &NamedMemoryFile) -> Option<Ordering>
fn partial_cmp(&self, other: &NamedMemoryFile) -> 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 NamedMemoryFile
impl StructuralEq for NamedMemoryFile
impl StructuralPartialEq for NamedMemoryFile
Auto Trait Implementations
impl RefUnwindSafe for NamedMemoryFile
impl Send for NamedMemoryFile
impl Sync for NamedMemoryFile
impl Unpin for NamedMemoryFile
impl UnwindSafe for NamedMemoryFile
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