pub struct Identifier(pub Span<Symbol>);
Expand description
Represents any type of identifier in AirScript
Tuple Fields§
§0: Span<Symbol>
Implementations§
Source§impl Identifier
impl Identifier
pub fn new(span: SourceSpan, name: Symbol) -> Self
pub fn as_str(&self) -> &str
Sourcepub fn is_uppercase(&self) -> bool
pub fn is_uppercase(&self) -> bool
Returns true if all characters of this identifier are uppercase
Sourcepub fn is_generated(&self) -> bool
pub fn is_generated(&self) -> bool
Returns true if this identifier was generated by the compiler
Sourcepub fn is_special(&self) -> bool
pub fn is_special(&self) -> bool
Returns true if this identifier has the $
prefix associated with special identifiers
Trait Implementations§
Source§impl AsRef<Identifier> for NamespacedIdentifier
impl AsRef<Identifier> for NamespacedIdentifier
Source§fn as_ref(&self) -> &Identifier
fn as_ref(&self) -> &Identifier
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<Identifier> for QualifiedIdentifier
impl AsRef<Identifier> for QualifiedIdentifier
Source§fn as_ref(&self) -> &Identifier
fn as_ref(&self) -> &Identifier
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<Identifier> for ResolvableIdentifier
impl AsRef<Identifier> for ResolvableIdentifier
Source§fn as_ref(&self) -> &Identifier
fn as_ref(&self) -> &Identifier
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for Identifier
impl Clone for Identifier
Source§fn clone(&self) -> Identifier
fn clone(&self) -> Identifier
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Identifier
impl Debug for Identifier
Source§impl Display for Identifier
impl Display for Identifier
Source§impl From<Identifier> for RangeBound
impl From<Identifier> for RangeBound
Source§fn from(name: Identifier) -> Self
fn from(name: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<ResolvableIdentifier> for Identifier
impl From<ResolvableIdentifier> for Identifier
Source§fn from(id: ResolvableIdentifier) -> Self
fn from(id: ResolvableIdentifier) -> Self
Converts to this type from the input type.
Source§impl Hash for Identifier
impl Hash for Identifier
Source§impl Ord for Identifier
impl Ord for Identifier
Source§fn cmp(&self, other: &Identifier) -> Ordering
fn cmp(&self, other: &Identifier) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<&Identifier> for Identifier
impl PartialEq<&Identifier> for Identifier
Source§impl PartialEq<&str> for Identifier
impl PartialEq<&str> for Identifier
Source§impl PartialEq for Identifier
impl PartialEq for Identifier
Source§impl PartialOrd for Identifier
impl PartialOrd for Identifier
Source§impl Spanned for Identifier
impl Spanned for Identifier
fn span(&self) -> SourceSpan
impl Copy for Identifier
impl Eq for Identifier
impl StructuralPartialEq for Identifier
Auto Trait Implementations§
impl Freeze for Identifier
impl RefUnwindSafe for Identifier
impl Send for Identifier
impl Sync for Identifier
impl Unpin for Identifier
impl UnwindSafe for Identifier
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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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
Compare self to
key
and return true
if they are equal.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>
Converts
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>
Converts
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