Enum erg_parser::ast::Accessor
source · [−]pub enum Accessor {
Ident(Identifier),
Attr(Attribute),
TupleAttr(TupleAttribute),
Subscr(Subscript),
TypeApp(TypeApp),
}
Variants
Ident(Identifier)
Attr(Attribute)
TupleAttr(TupleAttribute)
Subscr(Subscript)
TypeApp(TypeApp)
Implementations
sourceimpl Accessor
impl Accessor
pub const fn local(symbol: Token) -> Self
pub const fn public(dot: Token, symbol: Token) -> Self
pub fn attr(obj: Expr, ident: Identifier) -> Self
pub fn tuple_attr(obj: Expr, index: Literal) -> Self
pub fn subscr(obj: Expr, index: Expr) -> Self
pub const fn name(&self) -> Option<&Str>
pub fn is_const(&self) -> bool
Trait Implementations
sourceimpl Locational for Accessor
impl Locational for Accessor
sourceimpl NestedDisplay for Accessor
impl NestedDisplay 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
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