#[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_tThe embedded base node.
constant: *mut pm_nodeArrayPatternNode#constant
Represents the optional constant preceding the Array
foo in Bar[]
^^^ foo in Bar[1, 2, 3]
^^^ foo in Bar::Baz[1, 2, 3]
^^^^^^^^requireds: pm_node_listArrayPatternNode#requireds
Represents the required elements of the array pattern.
foo in [1, 2]
^ ^rest: *mut pm_nodeArrayPatternNode#rest
Represents the rest element of the array pattern.
foo in *bar
^^^^posts: pm_node_listArrayPatternNode#posts
Represents the elements after the rest element of the array pattern.
foo in *bar, baz
^^^opening_loc: pm_location_tArrayPatternNode#opening_loc
Represents the opening location of the array pattern.
foo in [1, 2]
^closing_loc: pm_location_tArrayPatternNode#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 duplicate 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