Skip to main content

Probe

Struct Probe 

Source
pub struct Probe<'t> { /* private fields */ }
Expand description

A term being looked up in a section, read once: its group and, for a text literal, the parts its order is made of.

TermOrder::cmp reads both of its terms on every call: for two text literals that is the group of each (a UTF-8 check and a scan for the closing quote) and then their parts again. A lookup compares one term against a few dozen stored ones in every section it searches, so it read the term it was looking for a few hundred times: a BIND that made 195,000 new strings spent five times as long finding out they were new as it did on a byte-ordered file. Probe::cmp_stored is the same order with the looked-up side read once and the stored side read at most once.

Implementations§

Source§

impl Probe<'_>

Source

pub fn cmp_stored(&self, a: &[u8]) -> Ordering

order.cmp(stored, term): where a stored token sorts against the term this probe was made for.

Auto Trait Implementations§

§

impl<'t> Forget for Probe<'t>

§

impl<'t> Freeze for Probe<'t>

§

impl<'t> Move for Probe<'t>

§

impl<'t> RefUnwindSafe for Probe<'t>

§

impl<'t> Send for Probe<'t>

§

impl<'t> Sync for Probe<'t>

§

impl<'t> Unpin for Probe<'t>

§

impl<'t> UnsafeUnpin for Probe<'t>

§

impl<'t> UnwindSafe for Probe<'t>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V