Struct erg_compiler::hir::Identifier
source · [−]pub struct Identifier {
pub dot: Option<Token>,
pub name: VarName,
pub __name__: Option<Str>,
pub t: Type,
}
Fields
dot: Option<Token>
name: VarName
__name__: Option<Str>
t: Type
Implementations
sourceimpl Identifier
impl Identifier
pub const fn new(
dot: Option<Token>,
name: VarName,
__name__: Option<Str>,
t: Type
) -> Self
pub fn public(name: &'static str) -> Self
pub fn private(name: Str) -> Self
pub fn private_with_line(name: Str, line: usize) -> Self
pub fn public_with_line(dot: Token, name: Str, line: usize) -> Self
pub const fn bare(dot: Option<Token>, name: VarName) -> Self
pub fn is_const(&self) -> bool
pub const fn vis(&self) -> Visibility
pub const fn inspect(&self) -> &Str
pub fn is_procedural(&self) -> bool
Trait Implementations
sourceimpl Clone for Identifier
impl Clone for Identifier
sourcefn clone(&self) -> Identifier
fn clone(&self) -> Identifier
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Identifier
impl Debug for Identifier
sourceimpl Display for Identifier
impl Display for Identifier
sourceimpl From<&Identifier> for Field
impl From<&Identifier> for Field
sourcefn from(ident: &Identifier) -> Self
fn from(ident: &Identifier) -> Self
Converts to this type from the input type.
sourceimpl HasType for Identifier
impl HasType for Identifier
fn ref_t(&self) -> &Type
fn ref_mut_t(&mut self) -> &mut Type
fn signature_t(&self) -> Option<&Type>
fn signature_mut_t(&mut self) -> Option<&mut Type>
fn t(&self) -> Type
fn inner_ts(&self) -> Vec<Type, Global>
fn lhs_t(&self) -> &Type
fn rhs_t(&self) -> &Type
sourceimpl Hash for Identifier
impl Hash for Identifier
sourceimpl Locational for Identifier
impl Locational for Identifier
sourceimpl NestedDisplay for Identifier
impl NestedDisplay for Identifier
sourceimpl PartialEq<Identifier> for Identifier
impl PartialEq<Identifier> for Identifier
sourcefn 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 ==
. Read more
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more