#[non_exhaustive]pub enum PatternTarget {
Filename,
Path,
PathWithoutFilename,
TypeName,
}Expand description
The part of an identifier against which a crate::Pattern is matched.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Filename
The last path segment, such as handler.rs.
Path
The complete normalized path.
PathWithoutFilename
The path with its final filename removed.
TypeName
A Rust type name with module or path qualification removed.
Implementations§
Trait Implementations§
Source§impl Clone for PatternTarget
impl Clone for PatternTarget
Source§fn clone(&self) -> PatternTarget
fn clone(&self) -> PatternTarget
Returns a copy 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 moreSource§impl Debug for PatternTarget
impl Debug for PatternTarget
Source§impl Display for PatternTarget
impl Display for PatternTarget
Source§impl Hash for PatternTarget
impl Hash for PatternTarget
Source§impl PartialEq for PatternTarget
impl PartialEq for PatternTarget
impl Copy for PatternTarget
impl Eq for PatternTarget
impl StructuralPartialEq for PatternTarget
Auto Trait Implementations§
impl Freeze for PatternTarget
impl RefUnwindSafe for PatternTarget
impl Send for PatternTarget
impl Sync for PatternTarget
impl Unpin for PatternTarget
impl UnwindSafe for PatternTarget
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.