Enum erg_compiler::hir::Accessor
source · pub enum Accessor {
Ident(Identifier),
Attr(Attribute),
}
Variants§
Ident(Identifier)
Attr(Attribute)
Implementations§
source§impl Accessor
impl Accessor
pub fn private_with_line(name: Str, line: u32) -> Self
pub fn public_with_line(name: Str, line: u32) -> Self
pub fn private(name: Token, vi: VarInfo) -> Self
pub fn public(name: Token, vi: VarInfo) -> Self
pub fn attr(obj: Expr, ident: Identifier) -> Self
pub fn var_info(&self) -> &VarInfo
pub fn show(&self) -> String
pub fn is_py_api(&self) -> bool
sourcepub fn qual_name(&self) -> Option<Str>
pub fn qual_name(&self) -> Option<Str>
Unique name of the object (class, module, etc.) to which the accessor points
pub fn local_name(&self) -> Option<&str>
Trait Implementations§
source§impl HasType for Accessor
impl HasType for Accessor
fn ref_t(&self) -> &Type
source§fn ref_mut_t(&mut self) -> &mut Type
fn ref_mut_t(&mut self) -> &mut Type
x.ref_mut_t()
may panic, in which case x
is Call
and x.ref_t() == Type::Failure
.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>
fn lhs_t(&self) -> &Type
fn rhs_t(&self) -> &Type
source§impl Locational for Accessor
impl Locational for Accessor
source§impl NestedDisplay for Accessor
impl NestedDisplay for Accessor
source§impl NoTypeDisplay for Accessor
impl NoTypeDisplay for Accessor
fn to_string_notype(&self) -> String
source§impl PartialEq<Accessor> for Accessor
impl PartialEq<Accessor> for Accessor
impl Eq for Accessor
impl StructuralEq for Accessor
impl StructuralPartialEq for Accessor
Auto Trait Implementations§
impl RefUnwindSafe for Accessor
impl Send for Accessor
impl Sync for Accessor
impl Unpin for Accessor
impl UnwindSafe for Accessor
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