pub struct MatchedItem<I>{
pub inner: I,
pub matched_string: String,
pub match_indices: Vec<(u32, u32)>,
}
Expand description
A matched item.
This contains the matched item, the dimension against which it was matched, represented as a string, and the indices of the matched characters.
The indices are pairs of (start, end)
where start
is the index of the
first character in the match, and end
is the index of the character after
the last character in the match.
Fields§
§inner: I
The matched item.
matched_string: String
The dimension against which the item was matched (as a string).
match_indices: Vec<(u32, u32)>
The indices of the matched characters.
Trait Implementations§
Source§impl<I> Clone for MatchedItem<I>
impl<I> Clone for MatchedItem<I>
Source§fn clone(&self) -> MatchedItem<I>
fn clone(&self) -> MatchedItem<I>
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 moreAuto Trait Implementations§
impl<I> Freeze for MatchedItem<I>where
I: Freeze,
impl<I> RefUnwindSafe for MatchedItem<I>where
I: RefUnwindSafe,
impl<I> Send for MatchedItem<I>
impl<I> Sync for MatchedItem<I>
impl<I> Unpin for MatchedItem<I>where
I: Unpin,
impl<I> UnwindSafe for MatchedItem<I>where
I: UnwindSafe,
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,
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