Enum erg_parser::ast::VarPattern
source · pub enum VarPattern {
Discard(Token),
Ident(Identifier),
List(VarListPattern),
Tuple(VarTuplePattern),
Record(VarRecordPattern),
DataPack(VarDataPackPattern),
}
Variants§
Discard(Token)
Ident(Identifier)
List(VarListPattern)
e.g. [x, y, z]
of [x, y, z] = [1, 2, 3]
Tuple(VarTuplePattern)
e.g. (x, y, z)
of (x, y, z) = (1, 2, 3)
Record(VarRecordPattern)
DataPack(VarDataPackPattern)
Implementations§
Trait Implementations§
source§impl Clone for VarPattern
impl Clone for VarPattern
source§fn clone(&self) -> VarPattern
fn clone(&self) -> VarPattern
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 VarPattern
impl Debug for VarPattern
source§impl Display for VarPattern
impl Display for VarPattern
source§impl Hash for VarPattern
impl Hash for VarPattern
source§impl Locational for VarPattern
impl Locational for VarPattern
source§impl NestedDisplay for VarPattern
impl NestedDisplay for VarPattern
source§impl PartialEq for VarPattern
impl PartialEq for VarPattern
source§fn eq(&self, other: &VarPattern) -> bool
fn eq(&self, other: &VarPattern) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for VarPattern
impl StructuralPartialEq for VarPattern
Auto Trait Implementations§
impl Freeze for VarPattern
impl RefUnwindSafe for VarPattern
impl Send for VarPattern
impl Sync for VarPattern
impl Unpin for VarPattern
impl UnwindSafe for VarPattern
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