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 FallocateFlags
pub 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() -> FallocateFlags
Returns an empty set of flags.
pub fn all() -> FallocateFlags
pub fn all() -> FallocateFlags
Returns the set containing all flags.
pub fn bits(&self) -> c_int
pub fn bits(&self) -> c_int
Returns 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) -> FallocateFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: FallocateFlags) -> bool
pub fn intersects(&self, other: FallocateFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: FallocateFlags) -> bool
pub fn contains(&self, other: FallocateFlags) -> bool
Returns 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 FallocateFlags
impl PartialEq for FallocateFlags
impl PartialEq for FallocateFlags
fn eq(&self, other: &FallocateFlags) -> bool
fn eq(&self, other: &FallocateFlags) -> bool
This 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) -> bool
This method tests for !=
.
impl Eq for FallocateFlags
impl Eq for FallocateFlags
impl Clone for FallocateFlags
impl Clone for FallocateFlags
fn clone(&self) -> FallocateFlags
fn clone(&self) -> FallocateFlags
Returns 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 FallocateFlags
fn 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) -> bool
This 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) -> bool
This 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) -> bool
This 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) -> bool
This 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 FallocateFlags
fn cmp(&self, other: &FallocateFlags) -> Ordering
fn cmp(&self, other: &FallocateFlags) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for FallocateFlags
impl Hash for FallocateFlags
fn 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 FallocateFlags
impl Binary for FallocateFlags
impl Binary for FallocateFlags
impl Octal for FallocateFlags
impl Octal for FallocateFlags
impl LowerHex for FallocateFlags
impl LowerHex for FallocateFlags
impl UpperHex for FallocateFlags
impl UpperHex for FallocateFlags
impl BitOr for FallocateFlags
impl BitOr for FallocateFlags
type Output = FallocateFlags
The resulting type after applying the |
operator.
fn bitor(self, other: FallocateFlags) -> FallocateFlags
fn bitor(self, other: FallocateFlags) -> FallocateFlags
Returns the union of the two sets of flags.
impl BitOrAssign for FallocateFlags
impl BitOrAssign for FallocateFlags
fn 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 FallocateFlags
type Output = FallocateFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: FallocateFlags) -> FallocateFlags
fn bitxor(self, other: FallocateFlags) -> FallocateFlags
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for FallocateFlags
impl BitXorAssign for FallocateFlags
fn 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 FallocateFlags
type Output = FallocateFlags
The resulting type after applying the &
operator.
fn bitand(self, other: FallocateFlags) -> FallocateFlags
fn bitand(self, other: FallocateFlags) -> FallocateFlags
Returns the intersection between the two sets of flags.
impl BitAndAssign for FallocateFlags
impl BitAndAssign for FallocateFlags
fn 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 FallocateFlags
type Output = FallocateFlags
The resulting type after applying the -
operator.
fn sub(self, other: FallocateFlags) -> FallocateFlags
fn sub(self, other: FallocateFlags) -> FallocateFlags
Returns the set difference of the two sets of flags.
impl SubAssign for FallocateFlags
impl SubAssign for FallocateFlags
fn 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 FallocateFlags
type Output = FallocateFlags
The resulting type after applying the !
operator.
fn not(self) -> FallocateFlags
fn not(self) -> FallocateFlags
Returns the complement of this set of flags.
impl Extend<FallocateFlags> for FallocateFlags
impl Extend<FallocateFlags> for FallocateFlags
fn 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 FallocateFlags
fn from_iter<T: IntoIterator<Item = FallocateFlags>>(
iterator: T
) -> FallocateFlags
fn from_iter<T: IntoIterator<Item = FallocateFlags>>(
iterator: T
) -> FallocateFlags
Creates a value from an iterator. Read more
Auto Trait Implementations
impl Send for FallocateFlags
impl Send for FallocateFlags
impl Sync for FallocateFlags
impl Sync for FallocateFlags