[−][src]Struct smlr::indexer::Index
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]
&self,
n: &LineNumber,
opts: &PresentationOptions
) -> usize
Return the number of matches for a given line
pub fn get_matches(
&self,
n: &LineNumber,
opts: &PresentationOptions
) -> Option<Vec<LineNumber>>
[src]
&self,
n: &LineNumber,
opts: &PresentationOptions
) -> Option<Vec<LineNumber>>
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,