Enum memfile::Seal [−][src]
A seal that prevents certain actions from being performed on a file.
Note that seals apply to a file, not a file descriptor. If two file descriptors refer to the same file, they share the same set of seals.
Seals can not be removed from a file once applied.
Variants (Non-exhaustive)
Prevent adding more seals to the file.
Prevent the file from being shrunk with truncate
or similar.
Combine with Seal::Grow
to prevent the file from being resized in any way.
Prevent the file from being extended with truncate
, fallocate
or simillar.
Combine with Seal::Shrink
to prevent the file from being resized in any way.
Prevent write to the file.
This will block all writes to the file and prevents any shared, writable memory mappings from being created.
If a shared, writable memory mapping already exists, adding this seal will fail.
Similar to Seal::Write
, but allows existing shared, writable memory mappings to modify the file contents.
This can be used to share a read-only view of the file with other processes, while still being able to modify the contents through an existing mapping.
Trait Implementations
impl BitAnd<Seal> for Seal
[src]
type Output = Seals
The resulting type after applying the &
operator.
fn bitand(self, right: Seal) -> Seals
[src]
impl BitAnd<Seals> for Seal
[src]
type Output = Seals
The resulting type after applying the &
operator.
fn bitand(self, right: Seals) -> Seals
[src]
impl BitOr<Seal> for Seal
[src]
type Output = Seals
The resulting type after applying the |
operator.
fn bitor(self, right: Seal) -> Seals
[src]
impl BitOr<Seals> for Seal
[src]
type Output = Seals
The resulting type after applying the |
operator.
fn bitor(self, right: Seals) -> Seals
[src]
impl BitXor<Seal> for Seal
[src]
type Output = Seals
The resulting type after applying the ^
operator.
fn bitxor(self, right: Seal) -> Seals
[src]
impl BitXor<Seals> for Seal
[src]
type Output = Seals
The resulting type after applying the ^
operator.
fn bitxor(self, right: Seals) -> Seals
[src]
impl Clone for Seal
[src]
impl Copy for Seal
[src]
impl Debug for Seal
[src]
impl Eq for Seal
[src]
impl From<Seal> for Seals
[src]
impl Hash for Seal
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Seal
[src]
fn cmp(&self, other: &Seal) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Seal> for Seal
[src]
impl PartialOrd<Seal> for Seal
[src]
fn partial_cmp(&self, other: &Seal) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Seal
[src]
impl StructuralPartialEq for Seal
[src]
impl Sub<Seal> for Seal
[src]
type Output = Seals
The resulting type after applying the -
operator.
fn sub(self, right: Seal) -> Seals
[src]
impl Sub<Seals> for Seal
[src]
Auto Trait Implementations
impl RefUnwindSafe for Seal
[src]
impl Send for Seal
[src]
impl Sync for Seal
[src]
impl Unpin for Seal
[src]
impl UnwindSafe for Seal
[src]
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,