[−][src]Struct extindex::reader::Reader
Index reader
Methods
impl<K, V> Reader<K, V> where
K: Ord + Encodable<K>,
V: Encodable<V>,
[src]
K: Ord + Encodable<K>,
V: Encodable<V>,
pub fn open<P: AsRef<Path>>(path: P) -> Result<Reader<K, V>, ReaderError>
[src]
Open an index file built using the Builder at the given path.
pub fn find(&self, needle: &K) -> Result<Option<Entry<K, V>>, ReaderError>
[src]
Finds any entry matching the given needle. This means that there is no guarantee on which entry is returned first if the key is present multiple times.
pub fn find_first(&self, needle: &K) -> Result<Option<Entry<K, V>>, ReaderError>
[src]
Finds the first entry matching the given needle. This is guarantee to return the first entry that the iterator had given at build time.
Warning: Make sure that you sort by key + value and use stable sorting if you care in which order values are returned.
pub fn iter<'a>(&'a self) -> impl Iterator<Item = Entry<K, V>> + 'a
[src]
Returns an iterator that iterates from the beginning of the index to the index of the index.
pub fn iter_from<'a>(
&'a self,
needle: &K
) -> Result<impl Iterator<Item = Entry<K, V>> + 'a, ReaderError>
[src]
&'a self,
needle: &K
) -> Result<impl Iterator<Item = Entry<K, V>> + 'a, ReaderError>
Returns an iterator that iterates from the given needle.
Warning: Make sure that you sort by key + value and use stable sorting if you care in which order values are returned.
Auto Trait Implementations
impl<K, V> Send for Reader<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for Reader<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,