pub enum IrPatternPart {
Literal(String),
WildcardMulti,
WildcardSingle,
}Expand description
A backend-neutral string pattern: decoded literal segments interleaved with wildcards, original case preserved.
This is the lossless heart of the faithful HIR. Eval lowercases (for case-insensitive matching) and compiles wildcards into a regex at compile time; convert renders the wildcards into backend-native tokens. Neither transform happens during lowering, so the pattern round-trips exactly.
Variants§
Literal(String)
WildcardMulti
* — matches any run of characters.
WildcardSingle
? — matches any single character.
Trait Implementations§
Source§impl Clone for IrPatternPart
impl Clone for IrPatternPart
Source§impl Debug for IrPatternPart
impl Debug for IrPatternPart
Source§impl<'de> Deserialize<'de> for IrPatternPart
impl<'de> Deserialize<'de> for IrPatternPart
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for IrPatternPart
Source§impl PartialEq for IrPatternPart
impl PartialEq for IrPatternPart
Source§impl Serialize for IrPatternPart
impl Serialize for IrPatternPart
impl StructuralPartialEq for IrPatternPart
Auto Trait Implementations§
impl Freeze for IrPatternPart
impl RefUnwindSafe for IrPatternPart
impl Send for IrPatternPart
impl Sync for IrPatternPart
impl Unpin for IrPatternPart
impl UnsafeUnpin for IrPatternPart
impl UnwindSafe for IrPatternPart
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.