pub struct Flags { /* private fields */ }
Expand description
Flags on nodes of Documentation
.
Can be put onto a documentation node with Documentation::set_flag
.
Implementations§
Source§impl Flags
impl Flags
Sourcepub const FLATTEN: Flags
pub const FLATTEN: Flags
Flatten structure into a parent.
For structure field inside a structure, this skips the one level and puts all the inner fields directly inside the outer struct.
For enums inside structs, this suggests that the fields are merged inline the outer struct, but still keeps the separation inside the documentation.
Sourcepub const OPTIONAL: Flags
pub const OPTIONAL: Flags
The presence of this field is optional.
This may be caused either by it to reasonably contain a no-value (eg. Option<T>
,
Vec<T>
) or by having a default value. Any possible default value should be described
in the doc comment.
Sourcepub fn from_bits(bits: u8) -> Option<Flags>
pub fn from_bits(bits: u8) -> Option<Flags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u8) -> Flags
pub const fn from_bits_truncate(bits: u8) -> Flags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const fn intersects(&self, other: Flags) -> bool
pub const fn intersects(&self, other: Flags) -> bool
Returns true
if there are flags common to both self
and other
.
Trait Implementations§
Source§impl BitAndAssign for Flags
impl BitAndAssign for Flags
Source§fn bitand_assign(&mut self, other: Flags)
fn bitand_assign(&mut self, other: Flags)
Disables all flags disabled in the set.
Source§impl BitOrAssign for Flags
impl BitOrAssign for Flags
Source§fn bitor_assign(&mut self, other: Flags)
fn bitor_assign(&mut self, other: Flags)
Adds the set of flags.
Source§impl BitXorAssign for Flags
impl BitXorAssign for Flags
Source§fn bitxor_assign(&mut self, other: Flags)
fn bitxor_assign(&mut self, other: Flags)
Toggles the set of flags.
Source§impl Extend<Flags> for Flags
impl Extend<Flags> for Flags
Source§fn extend<T: IntoIterator<Item = Flags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Flags>>(&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<Flags> for Flags
impl FromIterator<Flags> for Flags
Source§impl Ord for Flags
impl Ord for Flags
Source§impl PartialOrd for Flags
impl PartialOrd for Flags
Source§impl SubAssign for Flags
impl SubAssign for Flags
Source§fn sub_assign(&mut self, other: Flags)
fn sub_assign(&mut self, other: Flags)
Disables all flags enabled in the set.