[][src]Struct smlr::indexer::Index

pub struct Index<'a> { /* fields omitted */ }

Structure of our index.

Implementations

impl<'_> Index<'_>[src]

pub fn new(algo: ScoringAlgo, content: &str, path: Option<PathBuf>) -> Index<'_>[src]

pub fn create_index(&mut self, opts: &IndexingOptions)[src]

pub fn normalize(str: String, opts: &IndexingOptions) -> String[src]

pub fn process_line(&mut self, n: LineNumber, opts: &IndexingOptions)[src]

pub fn get_index_content(&self) -> &SerializedContent[src]

pub fn get_match_count(
    &self,
    n: &LineNumber,
    opts: &PresentationOptions
) -> usize
[src]

Return the number of matches for a given line

pub fn get_matches(
    &self,
    n: &LineNumber,
    opts: &PresentationOptions
) -> Option<Vec<LineNumber>>
[src]

pub fn get_lines(&self) -> &Vec<&str>[src]

pub fn get_hash(&self) -> &str[src]

pub fn save(&self) -> Result<PathBuf>[src]

pub fn load(&mut self) -> Option<()>[src]

pub fn load_or_create_index(&mut self, opts: &IndexingOptions)[src]

This function tried loading the index from file. If that fails for any reason, a new index will be created.

Trait Implementations

impl<'a> Clone for Index<'a>[src]

impl<'a> Debug for Index<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Index<'a>

impl<'a> Send for Index<'a>

impl<'a> Sync for Index<'a>

impl<'a> Unpin for Index<'a>

impl<'a> UnwindSafe for Index<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.