#[repr(C)]pub struct pm_array_pattern_node {
pub base: pm_node_t,
pub constant: *mut pm_node,
pub requireds: pm_node_list,
pub rest: *mut pm_node,
pub posts: pm_node_list,
pub opening_loc: pm_location_t,
pub closing_loc: pm_location_t,
}
Expand description
ArrayPatternNode
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]
^^^^^^^^^^^^^^^^^^^
Type: ::PM_ARRAY_PATTERN_NODE
@extends pm_node_t
Fields§
§base: pm_node_t
The embedded base node.
constant: *mut pm_node
ArrayPatternNode#constant
requireds: pm_node_list
ArrayPatternNode#requireds
Represents the required elements of the array pattern.
foo in [1, 2]
^ ^
rest: *mut pm_node
ArrayPatternNode#rest
Represents the rest element of the array pattern.
foo in *bar
^^^^
posts: pm_node_list
ArrayPatternNode#posts
Represents the elements after the rest element of the array pattern.
foo in *bar, baz
^^^
opening_loc: pm_location_t
ArrayPatternNode#opening_loc
Represents the opening location of the array pattern.
foo in [1, 2]
^
closing_loc: pm_location_t
ArrayPatternNode#closing_loc
Represents the closing location of the array pattern.
foo in [1, 2]
^
Trait Implementations§
Source§impl Clone for pm_array_pattern_node
impl Clone for pm_array_pattern_node
Source§fn clone(&self) -> pm_array_pattern_node
fn clone(&self) -> pm_array_pattern_node
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 pm_array_pattern_node
impl Debug for pm_array_pattern_node
Source§impl Default for pm_array_pattern_node
impl Default for pm_array_pattern_node
impl Copy for pm_array_pattern_node
Auto Trait Implementations§
impl Freeze for pm_array_pattern_node
impl RefUnwindSafe for pm_array_pattern_node
impl !Send for pm_array_pattern_node
impl !Sync for pm_array_pattern_node
impl Unpin for pm_array_pattern_node
impl UnwindSafe for pm_array_pattern_node
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