pub enum PatternKind {
Show 14 variants
Box(PatternBox),
Byte(PatternByte),
ByteString(PatternByteString),
Character(PatternCharacter),
Ident(PatternIdent),
MacroCall(PatternMacroCall),
Number(PatternNumber),
RangeExclusive(PatternRangeExclusive),
RangeInclusive(PatternRangeInclusive),
Reference(PatternReference),
Slice(PatternSlice),
String(PatternString),
Struct(PatternStruct),
Tuple(PatternTuple),
}Variants§
Box(PatternBox)
Byte(PatternByte)
ByteString(PatternByteString)
Character(PatternCharacter)
Ident(PatternIdent)
MacroCall(PatternMacroCall)
Number(PatternNumber)
RangeExclusive(PatternRangeExclusive)
RangeInclusive(PatternRangeInclusive)
Reference(PatternReference)
Slice(PatternSlice)
String(PatternString)
Struct(PatternStruct)
Tuple(PatternTuple)
Implementations§
Source§impl PatternKind
impl PatternKind
pub fn into_box(self) -> Option<PatternBox>
pub fn into_byte(self) -> Option<PatternByte>
pub fn into_byte_string(self) -> Option<PatternByteString>
pub fn into_character(self) -> Option<PatternCharacter>
pub fn into_ident(self) -> Option<PatternIdent>
pub fn into_macro_call(self) -> Option<PatternMacroCall>
pub fn into_number(self) -> Option<PatternNumber>
pub fn into_range_exclusive(self) -> Option<PatternRangeExclusive>
pub fn into_range_inclusive(self) -> Option<PatternRangeInclusive>
pub fn into_reference(self) -> Option<PatternReference>
pub fn into_slice(self) -> Option<PatternSlice>
pub fn into_string(self) -> Option<PatternString>
pub fn into_struct(self) -> Option<PatternStruct>
pub fn into_tuple(self) -> Option<PatternTuple>
pub fn as_box(&self) -> Option<&PatternBox>
pub fn as_byte(&self) -> Option<&PatternByte>
pub fn as_byte_string(&self) -> Option<&PatternByteString>
pub fn as_character(&self) -> Option<&PatternCharacter>
pub fn as_ident(&self) -> Option<&PatternIdent>
pub fn as_macro_call(&self) -> Option<&PatternMacroCall>
pub fn as_number(&self) -> Option<&PatternNumber>
pub fn as_range_exclusive(&self) -> Option<&PatternRangeExclusive>
pub fn as_range_inclusive(&self) -> Option<&PatternRangeInclusive>
pub fn as_reference(&self) -> Option<&PatternReference>
pub fn as_slice(&self) -> Option<&PatternSlice>
pub fn as_string(&self) -> Option<&PatternString>
pub fn as_struct(&self) -> Option<&PatternStruct>
pub fn as_tuple(&self) -> Option<&PatternTuple>
pub fn is_box(&self) -> bool
pub fn is_byte(&self) -> bool
pub fn is_byte_string(&self) -> bool
pub fn is_character(&self) -> bool
pub fn is_ident(&self) -> bool
pub fn is_macro_call(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_range_exclusive(&self) -> bool
pub fn is_range_inclusive(&self) -> bool
pub fn is_reference(&self) -> bool
pub fn is_slice(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_struct(&self) -> bool
pub fn is_tuple(&self) -> bool
Trait Implementations§
Source§impl Debug for PatternKind
impl Debug for PatternKind
Source§impl<'a> Index<&'a PatternKind> for str
impl<'a> Index<&'a PatternKind> for str
Source§impl Index<PatternKind> for str
impl Index<PatternKind> for str
Auto Trait Implementations§
impl Freeze for PatternKind
impl RefUnwindSafe for PatternKind
impl Send for PatternKind
impl Sync for PatternKind
impl Unpin for PatternKind
impl UnsafeUnpin for PatternKind
impl UnwindSafe for PatternKind
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