Struct air_ir::Identifier
source · pub struct Identifier(_);
Expand description
Represents any type of identifier in AirScript
Implementations§
source§impl Identifier
impl Identifier
pub fn new(span: SourceSpan, name: Symbol) -> Identifier
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 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 Clone for Identifier
impl Clone for Identifier
source§fn clone(&self) -> Identifier
fn clone(&self) -> Identifier
Returns a copy 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<ResolvableIdentifier> for Identifier
impl From<ResolvableIdentifier> for Identifier
source§fn from(id: ResolvableIdentifier) -> Identifier
fn from(id: ResolvableIdentifier) -> Identifier
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§fn eq(&self, other: &&Identifier) -> bool
fn eq(&self, other: &&Identifier) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<&str> for Identifier
impl PartialEq<&str> for Identifier
source§impl PartialEq<Identifier> for Identifier
impl PartialEq<Identifier> for Identifier
source§fn eq(&self, other: &Identifier) -> bool
fn eq(&self, other: &Identifier) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Identifier> for Identifier
impl PartialOrd<Identifier> for Identifier
source§fn partial_cmp(&self, other: &Identifier) -> Option<Ordering>
fn partial_cmp(&self, other: &Identifier) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Spanned for Identifier
impl Spanned for Identifier
fn span(&self) -> SourceSpan
impl Copy for Identifier
impl Eq for Identifier
impl StructuralEq for Identifier
impl StructuralPartialEq for Identifier
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.