pub struct Match {
pub score: i32,
pub positions: Vec<usize>,
}Expand description
A scored hit.
Fields§
§score: i32Higher is better. Only comparable between matches on the same needle.
positions: Vec<usize>Byte offsets of the matched characters, ascending, for highlighting. Byte rather than char offsets so a renderer can slice the haystack directly.
Trait Implementations§
impl Eq for Match
impl StructuralPartialEq for Match
Auto Trait Implementations§
impl Freeze for Match
impl RefUnwindSafe for Match
impl Send for Match
impl Sync for Match
impl Unpin for Match
impl UnsafeUnpin for Match
impl UnwindSafe for Match
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