Struct lldb::FilePermissions
source · [−]#[repr(C)]pub struct FilePermissions { /* private fields */ }
Implementations
sourceimpl FilePermissions
impl FilePermissions
pub const WORLD_EXECUTE: FilePermissions = Self{ bits: 1,}
pub const WORLD_WRITE: FilePermissions = Self{ bits: 2,}
pub const WORLD_READ: FilePermissions = Self{ bits: 4,}
pub const GROUP_EXECUTE: FilePermissions = Self{ bits: 8,}
pub const GROUP_WRITE: FilePermissions = Self{ bits: 16,}
pub const GROUP_READ: FilePermissions = Self{ bits: 32,}
pub const USER_EXECUTE: FilePermissions = Self{ bits: 64,}
pub const USER_WRITE: FilePermissions = Self{ bits: 128,}
pub const USER_READ: FilePermissions = Self{ bits: 256,}
pub const WORLD_RX: FilePermissions = Self{ bits: Self::WORLD_READ.bits | Self::WORLD_EXECUTE.bits,}
pub const WORLD_RW: FilePermissions = Self{ bits: Self::WORLD_READ.bits | Self::WORLD_WRITE.bits,}
pub const WORLD_RWX: FilePermissions = Self{ bits: Self::WORLD_READ.bits | Self::WORLD_WRITE.bits | Self::WORLD_EXECUTE.bits,}
pub const GROUP_RX: FilePermissions = Self{ bits: Self::GROUP_READ.bits | Self::GROUP_EXECUTE.bits,}
pub const GROUP_RW: FilePermissions = Self{ bits: Self::GROUP_READ.bits | Self::GROUP_WRITE.bits,}
pub const GROUP_RWX: FilePermissions = Self{ bits: Self::GROUP_READ.bits | Self::GROUP_WRITE.bits | Self::GROUP_EXECUTE.bits,}
pub const USER_RX: FilePermissions = Self{ bits: Self::USER_READ.bits | Self::USER_EXECUTE.bits,}
pub const USER_RW: FilePermissions = Self{ bits: Self::USER_READ.bits | Self::USER_WRITE.bits,}
pub const USER_RWX: FilePermissions = Self{ bits: Self::USER_READ.bits | Self::USER_WRITE.bits | Self::USER_EXECUTE.bits,}
pub const EVERYONE_R: FilePermissions = Self{ bits: Self::WORLD_READ.bits | Self::GROUP_READ.bits | Self::USER_READ.bits,}
pub const EVERYONE_W: FilePermissions = Self{ bits: Self::WORLD_WRITE.bits | Self::GROUP_WRITE.bits | Self::USER_WRITE.bits,}
pub const EVERYONE_X: FilePermissions = Self{ bits: Self::WORLD_EXECUTE.bits | Self::GROUP_EXECUTE.bits | Self::USER_EXECUTE.bits,}
pub const EVERYONE_RW: FilePermissions = Self{ bits: Self::EVERYONE_R.bits | Self::EVERYONE_W.bits,}
pub const EVERYONE_RX: FilePermissions = Self{ bits: Self::EVERYONE_R.bits | Self::EVERYONE_X.bits,}
pub const EVERYONE_RWX: FilePermissions = Self{ bits: Self::EVERYONE_R.bits | Self::EVERYONE_W.bits | Self::EVERYONE_X.bits,}
pub const FILE_DEFAULT: FilePermissions = Self{ bits: Self::USER_RW.bits,}
pub const DIRECTORY_DEFAULT: FilePermissions = Self{ bits: Self::USER_RWX.bits,}
sourcepub const fn empty() -> FilePermissions
pub const fn empty() -> FilePermissions
Returns an empty set of flags.
sourcepub const fn all() -> FilePermissions
pub const fn all() -> FilePermissions
Returns the set containing all flags.
sourcepub const fn from_bits(bits: u32) -> Option<FilePermissions>
pub const fn from_bits(bits: u32) -> Option<FilePermissions>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u32) -> FilePermissions
pub const fn from_bits_truncate(bits: u32) -> FilePermissions
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> FilePermissions
pub const unsafe fn from_bits_unchecked(bits: u32) -> FilePermissions
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
sourcepub const fn intersects(&self, other: FilePermissions) -> bool
pub const fn intersects(&self, other: FilePermissions) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: FilePermissions) -> bool
pub const fn contains(&self, other: FilePermissions) -> bool
Returns true
if all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: FilePermissions)
pub fn insert(&mut self, other: FilePermissions)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: FilePermissions)
pub fn remove(&mut self, other: FilePermissions)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: FilePermissions)
pub fn toggle(&mut self, other: FilePermissions)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: FilePermissions, value: bool)
pub fn set(&mut self, other: FilePermissions, value: bool)
Inserts or removes the specified flags depending on the passed value.
sourcepub const fn intersection(self, other: FilePermissions) -> FilePermissions
pub const fn intersection(self, other: FilePermissions) -> FilePermissions
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
sourcepub const fn union(self, other: FilePermissions) -> FilePermissions
pub const fn union(self, other: FilePermissions) -> FilePermissions
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
sourcepub const fn difference(self, other: FilePermissions) -> FilePermissions
pub const fn difference(self, other: FilePermissions) -> FilePermissions
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
sourcepub const fn symmetric_difference(
self,
other: FilePermissions
) -> FilePermissions
pub const fn symmetric_difference(
self,
other: FilePermissions
) -> FilePermissions
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
sourcepub const fn complement(self) -> FilePermissions
pub const fn complement(self) -> FilePermissions
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations
sourceimpl Binary for FilePermissions
impl Binary for FilePermissions
sourceimpl BitAnd<FilePermissions> for FilePermissions
impl BitAnd<FilePermissions> for FilePermissions
sourcefn bitand(self, other: FilePermissions) -> FilePermissions
fn bitand(self, other: FilePermissions) -> FilePermissions
Returns the intersection between the two sets of flags.
type Output = FilePermissions
type Output = FilePermissions
&
operator.sourceimpl BitAndAssign<FilePermissions> for FilePermissions
impl BitAndAssign<FilePermissions> for FilePermissions
sourcefn bitand_assign(&mut self, other: FilePermissions)
fn bitand_assign(&mut self, other: FilePermissions)
Disables all flags disabled in the set.
sourceimpl BitOr<FilePermissions> for FilePermissions
impl BitOr<FilePermissions> for FilePermissions
sourcefn bitor(self, other: FilePermissions) -> FilePermissions
fn bitor(self, other: FilePermissions) -> FilePermissions
Returns the union of the two sets of flags.
type Output = FilePermissions
type Output = FilePermissions
|
operator.sourceimpl BitOrAssign<FilePermissions> for FilePermissions
impl BitOrAssign<FilePermissions> for FilePermissions
sourcefn bitor_assign(&mut self, other: FilePermissions)
fn bitor_assign(&mut self, other: FilePermissions)
Adds the set of flags.
sourceimpl BitXor<FilePermissions> for FilePermissions
impl BitXor<FilePermissions> for FilePermissions
sourcefn bitxor(self, other: FilePermissions) -> FilePermissions
fn bitxor(self, other: FilePermissions) -> FilePermissions
Returns the left flags, but with all the right flags toggled.
type Output = FilePermissions
type Output = FilePermissions
^
operator.sourceimpl BitXorAssign<FilePermissions> for FilePermissions
impl BitXorAssign<FilePermissions> for FilePermissions
sourcefn bitxor_assign(&mut self, other: FilePermissions)
fn bitxor_assign(&mut self, other: FilePermissions)
Toggles the set of flags.
sourceimpl Clone for FilePermissions
impl Clone for FilePermissions
sourcefn clone(&self) -> FilePermissions
fn clone(&self) -> FilePermissions
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for FilePermissions
impl Debug for FilePermissions
sourceimpl Extend<FilePermissions> for FilePermissions
impl Extend<FilePermissions> for FilePermissions
sourcefn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = FilePermissions>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = FilePermissions>,
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)sourceimpl FromIterator<FilePermissions> for FilePermissions
impl FromIterator<FilePermissions> for FilePermissions
sourcefn from_iter<T>(iterator: T) -> FilePermissionswhere
T: IntoIterator<Item = FilePermissions>,
fn from_iter<T>(iterator: T) -> FilePermissionswhere
T: IntoIterator<Item = FilePermissions>,
sourceimpl Hash for FilePermissions
impl Hash for FilePermissions
sourceimpl LowerHex for FilePermissions
impl LowerHex for FilePermissions
sourceimpl Not for FilePermissions
impl Not for FilePermissions
sourcefn not(self) -> FilePermissions
fn not(self) -> FilePermissions
Returns the complement of this set of flags.
type Output = FilePermissions
type Output = FilePermissions
!
operator.sourceimpl Octal for FilePermissions
impl Octal for FilePermissions
sourceimpl Ord for FilePermissions
impl Ord for FilePermissions
sourcefn cmp(&self, other: &FilePermissions) -> Ordering
fn cmp(&self, other: &FilePermissions) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialEq<FilePermissions> for FilePermissions
impl PartialEq<FilePermissions> for FilePermissions
sourcefn eq(&self, other: &FilePermissions) -> bool
fn eq(&self, other: &FilePermissions) -> bool
sourceimpl PartialOrd<FilePermissions> for FilePermissions
impl PartialOrd<FilePermissions> for FilePermissions
sourcefn partial_cmp(&self, other: &FilePermissions) -> Option<Ordering>
fn partial_cmp(&self, other: &FilePermissions) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl Sub<FilePermissions> for FilePermissions
impl Sub<FilePermissions> for FilePermissions
sourcefn sub(self, other: FilePermissions) -> FilePermissions
fn sub(self, other: FilePermissions) -> FilePermissions
Returns the set difference of the two sets of flags.
type Output = FilePermissions
type Output = FilePermissions
-
operator.sourceimpl SubAssign<FilePermissions> for FilePermissions
impl SubAssign<FilePermissions> for FilePermissions
sourcefn sub_assign(&mut self, other: FilePermissions)
fn sub_assign(&mut self, other: FilePermissions)
Disables all flags enabled in the set.