#[repr(C)]pub struct MatchAsPattern<'gc> {
pub metadata: NodeMetadata<'gc>,
pub pattern: &'gc Node<'gc>,
pub target: &'gc Node<'gc>,
}Expand description
The MatchAsPattern AST node.
Fields§
§metadata: NodeMetadata<'gc>Source range, debug location, paren count, and node id.
pattern: &'gc Node<'gc>ESTree pattern property.
target: &'gc Node<'gc>ESTree target property.
Implementations§
Source§impl<'gc> MatchAsPattern<'gc>
impl<'gc> MatchAsPattern<'gc>
Sourcepub fn new(
metadata: NodeMetadata<'gc>,
pattern: &'gc Node<'gc>,
target: &'gc Node<'gc>,
) -> Self
pub fn new( metadata: NodeMetadata<'gc>, pattern: &'gc Node<'gc>, target: &'gc Node<'gc>, ) -> Self
Build MatchAsPattern from its metadata and ESTree.def fields.
Trait Implementations§
Auto Trait Implementations§
impl<'gc> !Freeze for MatchAsPattern<'gc>
impl<'gc> !RefUnwindSafe for MatchAsPattern<'gc>
impl<'gc> !Send for MatchAsPattern<'gc>
impl<'gc> !Sync for MatchAsPattern<'gc>
impl<'gc> !UnwindSafe for MatchAsPattern<'gc>
impl<'gc> Unpin for MatchAsPattern<'gc>
impl<'gc> UnsafeUnpin for MatchAsPattern<'gc>
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