[][src]Struct rustdoc_seeker::RustDocSeeker

pub struct RustDocSeeker { /* fields omitted */ }

RustDocSeeker contains DocItems and Index for fast searching.

The index is kv-map for <name, idx: u64 = (start: u32 << 32) + end: u32> where items[start..end] having the same DocItem.name.

Example

let seeker = rustdoc.build();

Methods

impl RustDocSeeker[src]

pub fn search<A: Automaton>(&self, aut: &A) -> impl Iterator<Item = &DocItem>[src]

Search with fst::Automaton, read fst::automaton / fst-levenshtein / fst-regex for details.

Example

let aut = fst_regex::Regex::new(".*dedup.*").unwrap();
for i in seeker.search(aut) {
    println!("{:?}", i);
}

let aut = fst_levenshtein::Levenshtein::new("dedXp", 1).unwrap();
for i in seeker.search(aut) {
    println!("{:?}", i);
}

let aut = fst::automaton::Subsequence::new("dedup");
for i in seeker.search(aut) {
    println!("{:?}", i);
}

Trait Implementations

impl Debug for RustDocSeeker[src]

Auto Trait Implementations

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