Enum erg_parser::ast::Accessor
source · pub enum Accessor {
Ident(Identifier),
Attr(Attribute),
TupleAttr(TupleAttribute),
Subscr(Subscript),
TypeApp(TypeApp),
}
Variants§
Implementations§
source§impl Accessor
impl Accessor
pub const fn local(symbol: Token) -> Self
pub const fn public(dot: Token, symbol: Token) -> Self
pub const fn explicit_local(dcolon: Token, symbol: Token) -> Self
pub const fn restricted(rest: VisRestriction, 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, r_sqbr: Token) -> Self
pub fn type_app(obj: Expr, type_args: TypeAppArgs) -> Self
pub const fn name(&self) -> Option<&Str>
pub fn is_const(&self) -> bool
Trait Implementations§
source§impl FromIterator<Accessor> for Namespaces
impl FromIterator<Accessor> for Namespaces
source§impl Locational for Accessor
impl Locational for Accessor
source§impl NestedDisplay for Accessor
impl NestedDisplay for Accessor
source§impl PartialEq for Accessor
impl PartialEq for Accessor
source§impl Stream<Accessor> for Namespaces
impl Stream<Accessor> for Namespaces
fn payload(self) -> Vec<Accessor>
fn ref_payload(&self) -> &Vec<Accessor>
fn ref_mut_payload(&mut self) -> &mut Vec<Accessor>
fn clear(&mut self)
fn len(&self) -> usize
fn size(&self) -> usize
fn is_empty(&self) -> bool
fn insert(&mut self, idx: usize, elem: T)
fn remove(&mut self, idx: usize) -> T
fn push(&mut self, elem: T)
fn append<S>(&mut self, s: &mut S)where
S: Stream<T>,
fn pop(&mut self) -> Option<T>
fn lpop(&mut self) -> Option<T>
fn get(&self, idx: usize) -> Option<&T>
fn get_mut(&mut self, idx: usize) -> Option<&mut T>
fn first(&self) -> Option<&T>
fn first_mut(&mut self) -> Option<&mut T>
fn last(&self) -> Option<&T>
fn last_mut(&mut self) -> Option<&mut T>
fn iter(&self) -> Iter<'_, T>
fn iter_mut(&mut self) -> IterMut<'_, T>
fn take_all(&mut self) -> Vec<T>
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
fn split_off(&mut self, at: usize) -> Vec<T>
source§fn retain(&mut self, f: impl FnMut(&T) -> bool)
fn retain(&mut self, f: impl FnMut(&T) -> bool)
Remove all elements that don’t satisfy the predicate.
fn concat(self, other: Self) -> Self
impl Eq for Accessor
impl StructuralPartialEq for Accessor
Auto Trait Implementations§
impl Freeze for Accessor
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