[−][src]Struct memfd::Memfd
An anonymous volatile file, with sealing capabilities.
Methods
impl Memfd
[src]
pub fn try_from_file(fp: File) -> Either<Self, File>
[src]
Try to convert a File
object into a Memfd
.
This requires transferring ownership of the File
.
If the underlying file-descriptor is compatible with
memfd/sealing, it returns a proper Memfd
object,
otherwise it transfers back ownership of the original
File
for further usage.
pub fn as_file(&self) -> &File
[src]
Return a File
object for this memfd.
pub fn into_file(self) -> File
[src]
Consume this Memfd
, returning the underlying File
.
pub fn seals(&self) -> Result<SealsHashSet, Error>
[src]
Return the current set of seals.
pub fn add_seal(&self, seal: FileSeal) -> Result<(), Error>
[src]
Add a single seal to the existing set of seals.
pub fn add_seals(&self, seals: &SealsHashSet) -> Result<(), Error>
[src]
Add some seals to the existing set of seals.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Memfd
impl Send for Memfd
impl Sync for Memfd
impl Unpin for Memfd
impl UnwindSafe for Memfd
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,