pub struct PatternSetItem<'src> {
pub identifier: &'src str,
pub wildcard: bool,
/* private fields */
}Expand description
Each individual item in a set of patterns.
In the pattern set ($a, $b*), $a and $b* are represented by a
PatternSetItem.
Fields§
§identifier: &'src str§wildcard: boolImplementations§
Source§impl PatternSetItem<'_>
impl PatternSetItem<'_>
Sourcepub fn matches(&self, identifier: &Ident<'_>) -> bool
pub fn matches(&self, identifier: &Ident<'_>) -> bool
Returns true if ident matches this PatternSetItem.
For example, identifiers $a and $abc both match the
PatternSetItem for $a*.
Trait Implementations§
Source§impl<'src> Debug for PatternSetItem<'src>
impl<'src> Debug for PatternSetItem<'src>
Auto Trait Implementations§
impl<'src> Freeze for PatternSetItem<'src>
impl<'src> RefUnwindSafe for PatternSetItem<'src>
impl<'src> Send for PatternSetItem<'src>
impl<'src> Sync for PatternSetItem<'src>
impl<'src> Unpin for PatternSetItem<'src>
impl<'src> UnsafeUnpin for PatternSetItem<'src>
impl<'src> UnwindSafe for PatternSetItem<'src>
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> 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