pub enum Pat {
Str(&'static str),
MultiStr(&'static [&'static str]),
OwnedMultiStr(Vec<String>),
Sym(Symbol),
Num,
}
Expand description
The search pattern to look for. Used by span_matches_pat
Variants§
Str(&'static str)
A single string.
MultiStr(&'static [&'static str])
Any of the given strings.
OwnedMultiStr(Vec<String>)
Any of the given strings.
Sym(Symbol)
The string representation of the symbol.
Num
Any decimal or hexadecimal digit depending on the location.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pat
impl RefUnwindSafe for Pat
impl Send for Pat
impl Sync for Pat
impl Unpin for Pat
impl UnwindSafe for Pat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Str
: 24 bytesMultiStr
: 24 bytesOwnedMultiStr
: 24 bytesSym
: 12 bytesNum
: 0 bytes