Enum clippy_utils::check_proc_macro::Pat
source · pub enum Pat {
Str(&'static str),
OwnedStr(String),
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.
OwnedStr(String)
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 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
Layout§
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: 32 bytes
Size for each variant:
Str
: 20 bytesOwnedStr
: 28 bytesMultiStr
: 20 bytesOwnedMultiStr
: 28 bytesSym
: 4 bytesNum
: 0 bytes