#[non_exhaustive]pub enum BarewordRole {
Expression,
QualifiedName,
ModuleRequest,
MethodReceiver,
IndirectObject,
HashKey,
}Expand description
Syntactic roles for parsed barewords.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Expression
Plain expression-position bareword with unresolved meaning.
QualifiedName
Qualified name such as Foo::Bar outside a more specific context.
ModuleRequest
Bareword used as a static require module target.
MethodReceiver
Bareword used as a class/object receiver for ->.
IndirectObject
Bareword used as the object in an indirect-object call.
HashKey
Bareword used as an autoquoted hash key.
Trait Implementations§
Source§impl Clone for BarewordRole
impl Clone for BarewordRole
Source§fn clone(&self) -> BarewordRole
fn clone(&self) -> BarewordRole
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BarewordRole
Source§impl Debug for BarewordRole
impl Debug for BarewordRole
impl Eq for BarewordRole
Source§impl Hash for BarewordRole
impl Hash for BarewordRole
Source§impl PartialEq for BarewordRole
impl PartialEq for BarewordRole
Source§fn eq(&self, other: &BarewordRole) -> bool
fn eq(&self, other: &BarewordRole) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BarewordRole
Auto Trait Implementations§
impl Freeze for BarewordRole
impl RefUnwindSafe for BarewordRole
impl Send for BarewordRole
impl Sync for BarewordRole
impl Unpin for BarewordRole
impl UnsafeUnpin for BarewordRole
impl UnwindSafe for BarewordRole
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