pub struct PatternMap<T>where
T: LSend,{ /* private fields */ }Expand description
A map from Pattern to arbitrary data.
When used as a Pattern in and of itself, it simply iterates through
all contained patterns, returning the first match found.
You should not assume this search is deterministic.
If you’d like to use this structure in a PatternLinter, you may want to provide
the map as the search pattern, then use a pattern lookup once more to determine
the corresponding key.
Implementations§
Trait Implementations§
Source§impl<T> Default for PatternMap<T>where
T: LSend,
impl<T> Default for PatternMap<T>where
T: LSend,
Auto Trait Implementations§
impl<T> Freeze for PatternMap<T>
impl<T> !RefUnwindSafe for PatternMap<T>
impl<T> !Send for PatternMap<T>
impl<T> !Sync for PatternMap<T>
impl<T> Unpin for PatternMap<T>where
T: Unpin,
impl<T> !UnwindSafe for PatternMap<T>
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<P> DocPattern for Pwhere
P: PatternExt,
impl<P> DocPattern for Pwhere
P: PatternExt,
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 more