pub enum IdentKind {
Value,
Type,
Constant,
Wildcard,
}Expand description
The shape bucket an identifier string belongs to.
Variants§
Value
Binding name: let / fn / param / field / method / alias
/ module path segment / for-in var / pattern binding.
Type
Type name that isn’t pure-uppercase — Foo, Http,
HttpClient, MyStruct, _Internal. Accepted at
struct/enum/variant sites.
Constant
Pure-uppercase name — either a const declaration or a
valid type name that happens to be all caps (FOO, X,
HTTP, Dir::N). Accepted at struct/enum/variant sites
and at const sites. Assigned-to in a source expression
means “reassigning a constant” and is refused at parse
time.
Wildcard
Pure-underscore identifier (_, __) — match wildcard
and “explicitly discard” let (let _ = foo()).
Trait Implementations§
impl Copy for IdentKind
impl Eq for IdentKind
impl StructuralPartialEq for IdentKind
Auto Trait Implementations§
impl Freeze for IdentKind
impl RefUnwindSafe for IdentKind
impl Send for IdentKind
impl Sync for IdentKind
impl Unpin for IdentKind
impl UnsafeUnpin for IdentKind
impl UnwindSafe for IdentKind
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
Mutably borrows from an owned value. Read more