pub enum LiteralPattern {
Int(i64),
Number(f64),
Str(String),
Bool(bool),
None,
}Variants§
Int(i64)
Integer literal pattern (e.g. match x { 1 => ... }).
Added in phase 6 alongside Value::Int.
Number(f64)
Str(String)
Bool(bool)
None
Trait Implementations§
Source§impl Clone for LiteralPattern
impl Clone for LiteralPattern
Source§fn clone(&self) -> LiteralPattern
fn clone(&self) -> LiteralPattern
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 moreAuto Trait Implementations§
impl Freeze for LiteralPattern
impl RefUnwindSafe for LiteralPattern
impl Send for LiteralPattern
impl Sync for LiteralPattern
impl Unpin for LiteralPattern
impl UnsafeUnpin for LiteralPattern
impl UnwindSafe for LiteralPattern
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