pub struct SectionAttributes(/* private fields */);Expand description
The SectionAttributes flag value.
Implementations§
Source§impl SectionAttributes
impl SectionAttributes
Sourcepub const PURE_INSTRUCTIONS: SectionAttributes
pub const PURE_INSTRUCTIONS: SectionAttributes
The PURE_INSTRUCTIONS flag value.
Sourcepub const NO_TOC: SectionAttributes
pub const NO_TOC: SectionAttributes
The NO_TOC flag value.
Sourcepub const STRIP_STATIC_SYMS: SectionAttributes
pub const STRIP_STATIC_SYMS: SectionAttributes
The STRIP_STATIC_SYMS flag value.
Sourcepub const NO_DEAD_STRIP: SectionAttributes
pub const NO_DEAD_STRIP: SectionAttributes
The NO_DEAD_STRIP flag value.
Sourcepub const LIVE_SUPPORT: SectionAttributes
pub const LIVE_SUPPORT: SectionAttributes
The LIVE_SUPPORT flag value.
Sourcepub const SELF_MODIFYING_CODE: SectionAttributes
pub const SELF_MODIFYING_CODE: SectionAttributes
The SELF_MODIFYING_CODE flag value.
Sourcepub const DEBUG: SectionAttributes
pub const DEBUG: SectionAttributes
The DEBUG flag value.
Sourcepub const SOME_INSTRUCTIONS: SectionAttributes
pub const SOME_INSTRUCTIONS: SectionAttributes
The SOME_INSTRUCTIONS flag value.
Sourcepub const EXT_RELOC: SectionAttributes
pub const EXT_RELOC: SectionAttributes
The EXT_RELOC flag value.
Sourcepub const LOC_RELOC: SectionAttributes
pub const LOC_RELOC: SectionAttributes
The LOC_RELOC flag value.
Source§impl SectionAttributes
impl SectionAttributes
Sourcepub const fn empty() -> SectionAttributes
pub const fn empty() -> SectionAttributes
Get a flags value with all bits unset.
Sourcepub const fn all() -> SectionAttributes
pub const fn all() -> SectionAttributes
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<SectionAttributes>
pub const fn from_bits(bits: u32) -> Option<SectionAttributes>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> SectionAttributes
pub const fn from_bits_truncate(bits: u32) -> SectionAttributes
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> SectionAttributes
pub const fn from_bits_retain(bits: u32) -> SectionAttributes
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<SectionAttributes>
pub fn from_name(name: &str) -> Option<SectionAttributes>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: SectionAttributes) -> bool
pub const fn intersects(&self, other: SectionAttributes) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: SectionAttributes) -> bool
pub const fn contains(&self, other: SectionAttributes) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn insert(&mut self, other: SectionAttributes)
pub fn insert(&mut self, other: SectionAttributes)
The bitwise or (|) of the bits in two flags values.
Sourcepub fn remove(&mut self, other: SectionAttributes)
pub fn remove(&mut self, other: SectionAttributes)
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: SectionAttributes)
pub fn toggle(&mut self, other: SectionAttributes)
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub fn set(&mut self, other: SectionAttributes, value: bool)
pub fn set(&mut self, other: SectionAttributes, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: SectionAttributes) -> SectionAttributes
pub const fn intersection(self, other: SectionAttributes) -> SectionAttributes
The bitwise and (&) of the bits in two flags values.
Sourcepub const fn union(self, other: SectionAttributes) -> SectionAttributes
pub const fn union(self, other: SectionAttributes) -> SectionAttributes
The bitwise or (|) of the bits in two flags values.
Sourcepub const fn difference(self, other: SectionAttributes) -> SectionAttributes
pub const fn difference(self, other: SectionAttributes) -> SectionAttributes
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(
self,
other: SectionAttributes,
) -> SectionAttributes
pub const fn symmetric_difference( self, other: SectionAttributes, ) -> SectionAttributes
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub const fn complement(self) -> SectionAttributes
pub const fn complement(self) -> SectionAttributes
The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§impl SectionAttributes
impl SectionAttributes
Sourcepub const fn iter(&self) -> Iter<SectionAttributes> ⓘ
pub const fn iter(&self) -> Iter<SectionAttributes> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<SectionAttributes> ⓘ
pub const fn iter_names(&self) -> IterNames<SectionAttributes> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for SectionAttributes
impl Binary for SectionAttributes
Source§impl BitAnd for SectionAttributes
impl BitAnd for SectionAttributes
Source§fn bitand(self, other: SectionAttributes) -> SectionAttributes
fn bitand(self, other: SectionAttributes) -> SectionAttributes
The bitwise and (&) of the bits in two flags values.
Source§type Output = SectionAttributes
type Output = SectionAttributes
& operator.Source§impl BitAndAssign for SectionAttributes
impl BitAndAssign for SectionAttributes
Source§fn bitand_assign(&mut self, other: SectionAttributes)
fn bitand_assign(&mut self, other: SectionAttributes)
The bitwise and (&) of the bits in two flags values.
Source§impl BitOr for SectionAttributes
impl BitOr for SectionAttributes
Source§fn bitor(self, other: SectionAttributes) -> SectionAttributes
fn bitor(self, other: SectionAttributes) -> SectionAttributes
The bitwise or (|) of the bits in two flags values.
Source§type Output = SectionAttributes
type Output = SectionAttributes
| operator.Source§impl BitOrAssign for SectionAttributes
impl BitOrAssign for SectionAttributes
Source§fn bitor_assign(&mut self, other: SectionAttributes)
fn bitor_assign(&mut self, other: SectionAttributes)
The bitwise or (|) of the bits in two flags values.
Source§impl BitXor for SectionAttributes
impl BitXor for SectionAttributes
Source§fn bitxor(self, other: SectionAttributes) -> SectionAttributes
fn bitxor(self, other: SectionAttributes) -> SectionAttributes
The bitwise exclusive-or (^) of the bits in two flags values.
Source§type Output = SectionAttributes
type Output = SectionAttributes
^ operator.Source§impl BitXorAssign for SectionAttributes
impl BitXorAssign for SectionAttributes
Source§fn bitxor_assign(&mut self, other: SectionAttributes)
fn bitxor_assign(&mut self, other: SectionAttributes)
The bitwise exclusive-or (^) of the bits in two flags values.
Source§impl Clone for SectionAttributes
impl Clone for SectionAttributes
Source§fn clone(&self) -> SectionAttributes
fn clone(&self) -> SectionAttributes
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SectionAttributes
Source§impl Debug for SectionAttributes
impl Debug for SectionAttributes
impl Eq for SectionAttributes
Source§impl Extend<SectionAttributes> for SectionAttributes
impl Extend<SectionAttributes> for SectionAttributes
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = SectionAttributes>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = SectionAttributes>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for SectionAttributes
impl Flags for SectionAttributes
Source§const FLAGS: &'static [Flag<SectionAttributes>]
const FLAGS: &'static [Flag<SectionAttributes>]
Source§fn from_bits_retain(bits: u32) -> SectionAttributes
fn from_bits_retain(bits: u32) -> SectionAttributes
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
Source§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS.Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in a flags value, truncating the result.Source§impl FromIterator<SectionAttributes> for SectionAttributes
impl FromIterator<SectionAttributes> for SectionAttributes
Source§fn from_iter<T>(iterator: T) -> SectionAttributeswhere
T: IntoIterator<Item = SectionAttributes>,
fn from_iter<T>(iterator: T) -> SectionAttributeswhere
T: IntoIterator<Item = SectionAttributes>,
The bitwise or (|) of the bits in each flags value.
Source§impl IntoIterator for SectionAttributes
impl IntoIterator for SectionAttributes
Source§type Item = SectionAttributes
type Item = SectionAttributes
Source§type IntoIter = Iter<SectionAttributes>
type IntoIter = Iter<SectionAttributes>
Source§fn into_iter(self) -> <SectionAttributes as IntoIterator>::IntoIter
fn into_iter(self) -> <SectionAttributes as IntoIterator>::IntoIter
Source§impl LowerHex for SectionAttributes
impl LowerHex for SectionAttributes
Source§impl Not for SectionAttributes
impl Not for SectionAttributes
Source§fn not(self) -> SectionAttributes
fn not(self) -> SectionAttributes
The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§type Output = SectionAttributes
type Output = SectionAttributes
! operator.Source§impl Octal for SectionAttributes
impl Octal for SectionAttributes
Source§impl PartialEq for SectionAttributes
impl PartialEq for SectionAttributes
impl StructuralPartialEq for SectionAttributes
Source§impl Sub for SectionAttributes
impl Sub for SectionAttributes
Source§fn sub(self, other: SectionAttributes) -> SectionAttributes
fn sub(self, other: SectionAttributes) -> SectionAttributes
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = SectionAttributes
type Output = SectionAttributes
- operator.Source§impl SubAssign for SectionAttributes
impl SubAssign for SectionAttributes
Source§fn sub_assign(&mut self, other: SectionAttributes)
fn sub_assign(&mut self, other: SectionAttributes)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.