pub struct ChmodFlags { /* private fields */ }
Expand description
Flags to PipeHandle::chmod()
Implementations§
source§impl ChmodFlags
impl ChmodFlags
pub const READABLE: ChmodFlags = _
pub const WRITABLE: ChmodFlags = _
sourcepub const fn empty() -> ChmodFlags
pub const fn empty() -> ChmodFlags
Returns an empty set of flags
sourcepub const fn all() -> ChmodFlags
pub const fn all() -> ChmodFlags
Returns the set containing all flags.
sourcepub fn from_bits(bits: i32) -> Option<ChmodFlags>
pub fn from_bits(bits: i32) -> Option<ChmodFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: i32) -> ChmodFlags
pub const fn from_bits_truncate(bits: i32) -> ChmodFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: i32) -> ChmodFlags
pub const unsafe fn from_bits_unchecked(bits: i32) -> ChmodFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: ChmodFlags) -> bool
pub const fn intersects(&self, other: ChmodFlags) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: ChmodFlags) -> bool
pub const fn contains(&self, other: ChmodFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: ChmodFlags)
pub fn insert(&mut self, other: ChmodFlags)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: ChmodFlags)
pub fn remove(&mut self, other: ChmodFlags)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: ChmodFlags)
pub fn toggle(&mut self, other: ChmodFlags)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: ChmodFlags, value: bool)
pub fn set(&mut self, other: ChmodFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
source§impl Binary for ChmodFlags
impl Binary for ChmodFlags
source§impl BitAnd for ChmodFlags
impl BitAnd for ChmodFlags
source§fn bitand(self, other: ChmodFlags) -> ChmodFlags
fn bitand(self, other: ChmodFlags) -> ChmodFlags
Returns the intersection between the two sets of flags.
§type Output = ChmodFlags
type Output = ChmodFlags
&
operator.source§impl BitAndAssign for ChmodFlags
impl BitAndAssign for ChmodFlags
source§fn bitand_assign(&mut self, other: ChmodFlags)
fn bitand_assign(&mut self, other: ChmodFlags)
Disables all flags disabled in the set.
source§impl BitOr for ChmodFlags
impl BitOr for ChmodFlags
source§fn bitor(self, other: ChmodFlags) -> ChmodFlags
fn bitor(self, other: ChmodFlags) -> ChmodFlags
Returns the union of the two sets of flags.
§type Output = ChmodFlags
type Output = ChmodFlags
|
operator.source§impl BitOrAssign for ChmodFlags
impl BitOrAssign for ChmodFlags
source§fn bitor_assign(&mut self, other: ChmodFlags)
fn bitor_assign(&mut self, other: ChmodFlags)
Adds the set of flags.
source§impl BitXor for ChmodFlags
impl BitXor for ChmodFlags
source§fn bitxor(self, other: ChmodFlags) -> ChmodFlags
fn bitxor(self, other: ChmodFlags) -> ChmodFlags
Returns the left flags, but with all the right flags toggled.
§type Output = ChmodFlags
type Output = ChmodFlags
^
operator.source§impl BitXorAssign for ChmodFlags
impl BitXorAssign for ChmodFlags
source§fn bitxor_assign(&mut self, other: ChmodFlags)
fn bitxor_assign(&mut self, other: ChmodFlags)
Toggles the set of flags.
source§impl Clone for ChmodFlags
impl Clone for ChmodFlags
source§fn clone(&self) -> ChmodFlags
fn clone(&self) -> ChmodFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChmodFlags
impl Debug for ChmodFlags
source§impl Extend<ChmodFlags> for ChmodFlags
impl Extend<ChmodFlags> for ChmodFlags
source§fn extend<T: IntoIterator<Item = ChmodFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = ChmodFlags>>(&mut self, iterator: T)
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl FromIterator<ChmodFlags> for ChmodFlags
impl FromIterator<ChmodFlags> for ChmodFlags
source§fn from_iter<T: IntoIterator<Item = ChmodFlags>>(iterator: T) -> ChmodFlags
fn from_iter<T: IntoIterator<Item = ChmodFlags>>(iterator: T) -> ChmodFlags
source§impl Hash for ChmodFlags
impl Hash for ChmodFlags
source§impl LowerHex for ChmodFlags
impl LowerHex for ChmodFlags
source§impl Not for ChmodFlags
impl Not for ChmodFlags
source§fn not(self) -> ChmodFlags
fn not(self) -> ChmodFlags
Returns the complement of this set of flags.
§type Output = ChmodFlags
type Output = ChmodFlags
!
operator.source§impl Octal for ChmodFlags
impl Octal for ChmodFlags
source§impl Ord for ChmodFlags
impl Ord for ChmodFlags
source§fn cmp(&self, other: &ChmodFlags) -> Ordering
fn cmp(&self, other: &ChmodFlags) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ChmodFlags
impl PartialEq for ChmodFlags
source§fn eq(&self, other: &ChmodFlags) -> bool
fn eq(&self, other: &ChmodFlags) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ChmodFlags
impl PartialOrd for ChmodFlags
source§fn partial_cmp(&self, other: &ChmodFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &ChmodFlags) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Sub for ChmodFlags
impl Sub for ChmodFlags
source§fn sub(self, other: ChmodFlags) -> ChmodFlags
fn sub(self, other: ChmodFlags) -> ChmodFlags
Returns the set difference of the two sets of flags.
§type Output = ChmodFlags
type Output = ChmodFlags
-
operator.source§impl SubAssign for ChmodFlags
impl SubAssign for ChmodFlags
source§fn sub_assign(&mut self, other: ChmodFlags)
fn sub_assign(&mut self, other: ChmodFlags)
Disables all flags enabled in the set.