Struct FMIndex

Source
pub struct FMIndex<C: Character>(/* private fields */);
Expand description

FMIndex, count only.

The FM-Index is both a search index as well as compact representation of the text.

Implementations§

Source§

impl<C: Character> FMIndex<C>

Source

pub fn new<T: AsRef<[C]>>(text: &Text<C, T>) -> Result<Self, Error>

Create a new FMIndex without locate support.

Source§

impl<C: Character> FMIndex<C>

Source

pub fn search<K>(&self, pattern: K) -> FMIndexSearch<'_, C>
where K: AsRef<[C]>,

Search for a pattern in the text.

Source

pub fn len(&self) -> usize

The size of the text in the index

Trait Implementations§

Source§

impl<C: Character> SearchIndex<C> for FMIndex<C>

Source§

fn search<K>(&self, pattern: K) -> impl Search<'_, C>
where K: AsRef<[C]>,

Search for a pattern in the text. Read more
Source§

fn len(&self) -> usize

The size of the text in the index Read more
Source§

fn heap_size(&self) -> usize

The size of the data used by this structure on the heap, in bytes. Read more

Auto Trait Implementations§

§

impl<C> Freeze for FMIndex<C>

§

impl<C> RefUnwindSafe for FMIndex<C>
where C: RefUnwindSafe,

§

impl<C> Send for FMIndex<C>
where C: Send,

§

impl<C> Sync for FMIndex<C>
where C: Sync,

§

impl<C> Unpin for FMIndex<C>
where C: Unpin,

§

impl<C> UnwindSafe for FMIndex<C>
where C: UnwindSafe,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.