pub enum RubyPattern {
Pin(String),
Variable(String),
Literal(String),
Array(Vec<RubyPattern>),
Hash(Vec<(String, Option<RubyPattern>)>),
Find(Vec<RubyPattern>),
Deconstruct(String, Vec<(String, RubyPattern)>),
Guard(Box<RubyPattern>, String),
}Expand description
Ruby pattern matching (Ruby 3.x)
Variants§
Pin(String)
Variable(String)
Literal(String)
Array(Vec<RubyPattern>)
Hash(Vec<(String, Option<RubyPattern>)>)
Find(Vec<RubyPattern>)
Deconstruct(String, Vec<(String, RubyPattern)>)
Guard(Box<RubyPattern>, String)
Trait Implementations§
Source§impl Clone for RubyPattern
impl Clone for RubyPattern
Source§fn clone(&self) -> RubyPattern
fn clone(&self) -> RubyPattern
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 RubyPattern
impl Debug for RubyPattern
Auto Trait Implementations§
impl Freeze for RubyPattern
impl RefUnwindSafe for RubyPattern
impl Send for RubyPattern
impl Sync for RubyPattern
impl Unpin for RubyPattern
impl UnsafeUnpin for RubyPattern
impl UnwindSafe for RubyPattern
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