pub struct DeclModifiers(/* private fields */);Expand description
What a declaration is written with — the modifiers every reader used to find by searching its text.
override and final are contextual identifiers, [[maybe_unused]] is an attribute, and virtual/constexpr are
keywords inside the specifier sequence — so a consumer answering “does this declaration say override” had to
slice the declaration’s text and search it (written.contains("override")). The bits below are that question
answered once, when the summary is built, from the tokens the walk already had in hand: every consumer of the
summary reads a bit instead of re-reading text, and the answer cannot drift from the file.
Implementations§
Source§impl DeclModifiers
impl DeclModifiers
pub const VIRTUAL: Self
pub const OVERRIDE: Self
pub const FINAL: Self
pub const CONSTEXPR: Self
pub const CONSTEVAL: Self
pub const CONSTINIT: Self
pub const STATIC: Self
pub const INLINE: Self
pub const EXPLICIT: Self
Sourcepub const MAYBE_UNUSED: Self
pub const MAYBE_UNUSED: Self
[[maybe_unused]], and the reader’s answer that this declaration is not dead code.
Sourcepub const VARIADIC: Self
pub const VARIADIC: Self
A function with a variadic parameter list — void log(const char*, ...) or a parameter pack.
pub const DELETED: Self
pub const DEFAULTED: Self
Sourcepub const CONST: Self
pub const CONST: Self
A member function declared const — T sum() const. Written after the parameter list, which is why it was
missing while constexpr was not: the specifier sequence holds one and the declarator’s suffix the other.
Sourcepub const LVALUE_REFERENCE: Self
pub const LVALUE_REFERENCE: Self
A ref-qualifier: void f() & is callable only on an lvalue, void g() && only on an rvalue. noexcept and
the &/&& of a parameter type are not this — see function_suffix_in.
pub const RVALUE_REFERENCE: Self
Sourcepub const DEFINED: Self
pub const DEFINED: Self
The declaration is a definition — it carries a function body, or it is = default/= delete. A
declaration without the bit only declares; the distinction is what a “create the definition” edit needs.
pub const fn bits(self) -> u32
pub const fn from_bits(bits: u32) -> Self
pub const fn union(self, other: Self) -> Self
pub const fn contains(self, other: Self) -> bool
pub const fn is_empty(self) -> bool
Trait Implementations§
Source§impl Clone for DeclModifiers
impl Clone for DeclModifiers
impl Copy for DeclModifiers
Source§impl Debug for DeclModifiers
impl Debug for DeclModifiers
Source§impl Default for DeclModifiers
impl Default for DeclModifiers
impl Eq for DeclModifiers
Source§impl Hash for DeclModifiers
impl Hash for DeclModifiers
Source§impl PartialEq for DeclModifiers
impl PartialEq for DeclModifiers
impl StructuralPartialEq for DeclModifiers
Auto Trait Implementations§
impl Forget for DeclModifiers
impl Freeze for DeclModifiers
impl Move for DeclModifiers
impl RefUnwindSafe for DeclModifiers
impl Send for DeclModifiers
impl Sync for DeclModifiers
impl Unpin for DeclModifiers
impl UnsafeUnpin for DeclModifiers
impl UnwindSafe for DeclModifiers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more