Struct nix::fcntl::FallocateFlags [−]
pub struct FallocateFlags { /* fields omitted */ }Mode argument flags for fallocate determining operation performed on a given range.
Methods
impl FallocateFlags
impl FallocateFlagspub const FALLOC_FL_KEEP_SIZE: FallocateFlags
FALLOC_FL_KEEP_SIZE: FallocateFlags = FallocateFlags{bits: libc::FALLOC_FL_KEEP_SIZE,}
File size is not changed.
offset + len can be greater than file size.
pub const FALLOC_FL_PUNCH_HOLE: FallocateFlags
FALLOC_FL_PUNCH_HOLE: FallocateFlags = FallocateFlags{bits: libc::FALLOC_FL_PUNCH_HOLE,}
Deallocates space by creating a hole.
Must be ORed with FALLOC_FL_KEEP_SIZE. Byte range starts at offset and continues for len bytes.
pub const FALLOC_FL_COLLAPSE_RANGE: FallocateFlags
FALLOC_FL_COLLAPSE_RANGE: FallocateFlags = FallocateFlags{bits: libc::FALLOC_FL_COLLAPSE_RANGE,}
Removes byte range from a file without leaving a hole.
Byte range to collapse starts at offset and continues for len bytes.
pub const FALLOC_FL_ZERO_RANGE: FallocateFlags
FALLOC_FL_ZERO_RANGE: FallocateFlags = FallocateFlags{bits: libc::FALLOC_FL_ZERO_RANGE,}
Zeroes space in specified byte range.
Byte range starts at offset and continues for len bytes.
pub const FALLOC_FL_INSERT_RANGE: FallocateFlags
FALLOC_FL_INSERT_RANGE: FallocateFlags = FallocateFlags{bits: libc::FALLOC_FL_INSERT_RANGE,}
Increases file space by inserting a hole within the file size.
Does not overwrite existing data. Hole starts at offset and continues for len bytes.
pub const FALLOC_FL_UNSHARE_RANGE: FallocateFlags
FALLOC_FL_UNSHARE_RANGE: FallocateFlags = FallocateFlags{bits: libc::FALLOC_FL_UNSHARE_RANGE,}
Shared file data extants are made private to the file.
Gaurantees that a subsequent write will not fail due to lack of space.
pub fn empty() -> FallocateFlags
pub fn empty() -> FallocateFlagsReturns an empty set of flags.
pub fn all() -> FallocateFlags
pub fn all() -> FallocateFlagsReturns the set containing all flags.
pub fn bits(&self) -> c_int
pub fn bits(&self) -> c_intReturns the raw value of the flags currently stored.
pub fn from_bits(bits: c_int) -> Option<FallocateFlags>
pub fn from_bits(bits: c_int) -> Option<FallocateFlags>Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: c_int) -> FallocateFlags
pub fn from_bits_truncate(bits: c_int) -> FallocateFlagsConvert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> boolReturns true if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> boolReturns true if all flags are currently set.
pub fn intersects(&self, other: FallocateFlags) -> bool
pub fn intersects(&self, other: FallocateFlags) -> boolReturns true if there are flags common to both self and other.
pub fn contains(&self, other: FallocateFlags) -> bool
pub fn contains(&self, other: FallocateFlags) -> boolReturns true all of the flags in other are contained within self.
pub fn insert(&mut self, other: FallocateFlags)
pub fn insert(&mut self, other: FallocateFlags)Inserts the specified flags in-place.
pub fn remove(&mut self, other: FallocateFlags)
pub fn remove(&mut self, other: FallocateFlags)Removes the specified flags in-place.
pub fn toggle(&mut self, other: FallocateFlags)
pub fn toggle(&mut self, other: FallocateFlags)Toggles the specified flags in-place.
pub fn set(&mut self, other: FallocateFlags, value: bool)
pub fn set(&mut self, other: FallocateFlags, value: bool)Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for FallocateFlags
impl Copy for FallocateFlagsimpl PartialEq for FallocateFlags
impl PartialEq for FallocateFlagsfn eq(&self, other: &FallocateFlags) -> bool
fn eq(&self, other: &FallocateFlags) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &FallocateFlags) -> bool
fn ne(&self, other: &FallocateFlags) -> boolThis method tests for !=.
impl Eq for FallocateFlags
impl Eq for FallocateFlagsimpl Clone for FallocateFlags
impl Clone for FallocateFlagsfn clone(&self) -> FallocateFlags
fn clone(&self) -> FallocateFlagsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialOrd for FallocateFlags
impl PartialOrd for FallocateFlagsfn partial_cmp(&self, other: &FallocateFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &FallocateFlags) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &FallocateFlags) -> bool
fn lt(&self, other: &FallocateFlags) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &FallocateFlags) -> bool
fn le(&self, other: &FallocateFlags) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &FallocateFlags) -> bool
fn gt(&self, other: &FallocateFlags) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &FallocateFlags) -> bool
fn ge(&self, other: &FallocateFlags) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for FallocateFlags
impl Ord for FallocateFlagsfn cmp(&self, other: &FallocateFlags) -> Ordering
fn cmp(&self, other: &FallocateFlags) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Hash for FallocateFlags
impl Hash for FallocateFlagsfn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for FallocateFlags
impl Debug for FallocateFlagsimpl Binary for FallocateFlags
impl Binary for FallocateFlagsimpl Octal for FallocateFlags
impl Octal for FallocateFlagsimpl LowerHex for FallocateFlags
impl LowerHex for FallocateFlagsimpl UpperHex for FallocateFlags
impl UpperHex for FallocateFlagsimpl BitOr for FallocateFlags
impl BitOr for FallocateFlagstype Output = FallocateFlags
The resulting type after applying the | operator.
fn bitor(self, other: FallocateFlags) -> FallocateFlags
fn bitor(self, other: FallocateFlags) -> FallocateFlagsReturns the union of the two sets of flags.
impl BitOrAssign for FallocateFlags
impl BitOrAssign for FallocateFlagsfn bitor_assign(&mut self, other: FallocateFlags)
fn bitor_assign(&mut self, other: FallocateFlags)Adds the set of flags.
impl BitXor for FallocateFlags
impl BitXor for FallocateFlagstype Output = FallocateFlags
The resulting type after applying the ^ operator.
fn bitxor(self, other: FallocateFlags) -> FallocateFlags
fn bitxor(self, other: FallocateFlags) -> FallocateFlagsReturns the left flags, but with all the right flags toggled.
impl BitXorAssign for FallocateFlags
impl BitXorAssign for FallocateFlagsfn bitxor_assign(&mut self, other: FallocateFlags)
fn bitxor_assign(&mut self, other: FallocateFlags)Toggles the set of flags.
impl BitAnd for FallocateFlags
impl BitAnd for FallocateFlagstype Output = FallocateFlags
The resulting type after applying the & operator.
fn bitand(self, other: FallocateFlags) -> FallocateFlags
fn bitand(self, other: FallocateFlags) -> FallocateFlagsReturns the intersection between the two sets of flags.
impl BitAndAssign for FallocateFlags
impl BitAndAssign for FallocateFlagsfn bitand_assign(&mut self, other: FallocateFlags)
fn bitand_assign(&mut self, other: FallocateFlags)Disables all flags disabled in the set.
impl Sub for FallocateFlags
impl Sub for FallocateFlagstype Output = FallocateFlags
The resulting type after applying the - operator.
fn sub(self, other: FallocateFlags) -> FallocateFlags
fn sub(self, other: FallocateFlags) -> FallocateFlagsReturns the set difference of the two sets of flags.
impl SubAssign for FallocateFlags
impl SubAssign for FallocateFlagsfn sub_assign(&mut self, other: FallocateFlags)
fn sub_assign(&mut self, other: FallocateFlags)Disables all flags enabled in the set.
impl Not for FallocateFlags
impl Not for FallocateFlagstype Output = FallocateFlags
The resulting type after applying the ! operator.
fn not(self) -> FallocateFlags
fn not(self) -> FallocateFlagsReturns the complement of this set of flags.
impl Extend<FallocateFlags> for FallocateFlags
impl Extend<FallocateFlags> for FallocateFlagsfn extend<T: IntoIterator<Item = FallocateFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = FallocateFlags>>(&mut self, iterator: T)Extends a collection with the contents of an iterator. Read more
impl FromIterator<FallocateFlags> for FallocateFlags
impl FromIterator<FallocateFlags> for FallocateFlagsfn from_iter<T: IntoIterator<Item = FallocateFlags>>(
iterator: T
) -> FallocateFlags
fn from_iter<T: IntoIterator<Item = FallocateFlags>>(
iterator: T
) -> FallocateFlagsCreates a value from an iterator. Read more
Auto Trait Implementations
impl Send for FallocateFlags
impl Send for FallocateFlagsimpl Sync for FallocateFlags
impl Sync for FallocateFlags