Skip to main content

StandardAnalyzer

Struct StandardAnalyzer 

Source
pub struct StandardAnalyzer { /* private fields */ }
Expand description

Runs one tokenizer followed by filters in insertion order.

See crates/khive-text/docs/api/analyzer-pipeline.md.

Implementations§

Source§

impl StandardAnalyzer

Source

pub fn with_tokenizer(tokenizer: impl Tokenizer + 'static) -> Self

Create an analyzer with the given tokenizer and no filters.

Source

pub fn filter(self, f: impl TokenFilter + 'static) -> Self

Append a filter to the pipeline. Filters run in insertion order.

Trait Implementations§

Auto Trait Implementations§

§

impl !RefUnwindSafe for StandardAnalyzer

§

impl !UnwindSafe for StandardAnalyzer

§

impl Forget for StandardAnalyzer

§

impl Freeze for StandardAnalyzer
where *const ArcInner<dyn Tokenizer> is !null: Freeze, PhantomData<ArcInner<dyn Tokenizer>>: Freeze, *const u8 is !null: Freeze, PhantomData<Box<dyn TokenFilter>>: Freeze,

§

impl Move for StandardAnalyzer

§

impl Send for StandardAnalyzer
where Arc<dyn Tokenizer>: Send, RawVecInner: Send, BoxRaw<dyn TokenFilter>: Send,

§

impl Sync for StandardAnalyzer
where Arc<dyn Tokenizer>: Sync, RawVecInner: Sync, BoxRaw<dyn TokenFilter>: Sync,

§

impl Unpin for StandardAnalyzer
where Arc<dyn Tokenizer>: Unpin, *const u8 is !null: Unpin, Box<dyn TokenFilter>: Unpin,

§

impl UnsafeUnpin for StandardAnalyzer
where *const ArcInner<dyn Tokenizer> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Tokenizer>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<Box<dyn TokenFilter>>: UnsafeUnpin,

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<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, 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.