Struct ruby_prism::ArrayPatternNode
source · pub struct ArrayPatternNode<'pr> { /* private fields */ }
Expand description
Represents an array pattern in pattern matching.
foo in 1, 2
^^^^^^^^^^^
foo in [1, 2]
^^^^^^^^^^^^^
foo in *bar
^^^^^^^^^^^
foo in Bar[]
^^^^^^^^^^^^
foo in Bar[1, 2, 3]
^^^^^^^^^^^^^^^^^^^
Implementations§
source§impl<'pr> ArrayPatternNode<'pr>
impl<'pr> ArrayPatternNode<'pr>
sourcepub fn flags(&self) -> pm_node_flags_t
pub fn flags(&self) -> pm_node_flags_t
Returns the flags of this node.
sourcepub fn opening_loc(&self) -> Option<Location<'pr>>
pub fn opening_loc(&self) -> Option<Location<'pr>>
Returns the opening_loc
param
sourcepub fn closing_loc(&self) -> Option<Location<'pr>>
pub fn closing_loc(&self) -> Option<Location<'pr>>
Returns the closing_loc
param
Trait Implementations§
Auto Trait Implementations§
impl<'pr> RefUnwindSafe for ArrayPatternNode<'pr>
impl<'pr> !Send for ArrayPatternNode<'pr>
impl<'pr> !Sync for ArrayPatternNode<'pr>
impl<'pr> Unpin for ArrayPatternNode<'pr>
impl<'pr> !UnwindSafe for ArrayPatternNode<'pr>
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