pub struct VectoredMatch<'a> {
pub id: ExpressionIndex,
pub source: VectoredSubset<'a, 'a>,
}
vectored
only.Expand description
Match object returned when searching vectored string data.
This is returned by e.g.
Scratch::scan_sync_vectored()
.
Fields§
§id: ExpressionIndex
ID of matched expression, or 0
if unspecified.
source: VectoredSubset<'a, 'a>
The entire “ragged” subset of vectored string data matching the given pattern.
As with Match::source
for contiguous strings,
this reference is alive for as long as the 'data
lifetime
parameter provided to
Scratch::scan_sync_vectored()
, and can be
dereferenced and processed after a scan completes. The two lifetime
parameters of VectoredSubset
are collapsed into one here since the
difference between the 'string
and 'slice
lifetimes does not matter
to the search method.
Note that VectoredSubset::iter_slices()
is the only method this
crate exposes to access subsets of non-contiguous slice data, but the
result can simply be concatenated with
[T]::concat()
or with itertools::concat()
,
at the cost of copying the data. VectoredSubset::range
is
also provided, which is what is used to index into
VectoredByteSlices::index_range()
.
Trait Implementations§
Source§impl<'a> Clone for VectoredMatch<'a>
impl<'a> Clone for VectoredMatch<'a>
Source§fn clone(&self) -> VectoredMatch<'a>
fn clone(&self) -> VectoredMatch<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a> Debug for VectoredMatch<'a>
impl<'a> Debug for VectoredMatch<'a>
Source§impl<'a> Hash for VectoredMatch<'a>
impl<'a> Hash for VectoredMatch<'a>
Source§impl<'a> Ord for VectoredMatch<'a>
impl<'a> Ord for VectoredMatch<'a>
Source§fn cmp(&self, other: &VectoredMatch<'a>) -> Ordering
fn cmp(&self, other: &VectoredMatch<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'a> PartialEq for VectoredMatch<'a>
impl<'a> PartialEq for VectoredMatch<'a>
Source§impl<'a> PartialOrd for VectoredMatch<'a>
impl<'a> PartialOrd for VectoredMatch<'a>
impl<'a> Copy for VectoredMatch<'a>
impl<'a> Eq for VectoredMatch<'a>
impl<'a> StructuralPartialEq for VectoredMatch<'a>
Auto Trait Implementations§
impl<'a> Freeze for VectoredMatch<'a>
impl<'a> RefUnwindSafe for VectoredMatch<'a>
impl<'a> Send for VectoredMatch<'a>
impl<'a> Sync for VectoredMatch<'a>
impl<'a> Unpin for VectoredMatch<'a>
impl<'a> UnwindSafe for VectoredMatch<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key
and return true
if they are equal.