pub struct Table<Map: MemoryMap, Access: Accessor> { /* private fields */ }Expand description
A table of a memory mapped text database.
Implementations§
Source§impl Table<SafeMemoryMap, TsvText>
impl Table<SafeMemoryMap, TsvText>
pub fn text_tsv_from_string(text: String) -> Self
pub fn text_tsv_from_str<S: AsRef<str>>(text: S) -> Self
Source§impl<Access: Accessor, Map: MemoryMap> Table<Map, Access>
impl<Access: Accessor, Map: MemoryMap> Table<Map, Access>
Sourcepub fn is_sorted(&self) -> Result<bool>
pub fn is_sorted(&self) -> Result<bool>
Return true if the database is sorted. Note: On large files (> 1TB) this may take some time to run.
Sourcepub fn keys(&self) -> impl Iterator<Item = Result<&str, Utf8Error>>
pub fn keys(&self) -> impl Iterator<Item = Result<&str, Utf8Error>>
Get all the keys as strings. Note: On large files (> 1TB) this may take some time to run.
Sourcepub fn cols(&self, i: usize) -> impl Iterator<Item = Result<&str, Utf8Error>>
pub fn cols(&self, i: usize) -> impl Iterator<Item = Result<&str, Utf8Error>>
Get one column as strings.
Sourcepub fn get_matching_lines(
&self,
key: &Access::KeyType,
) -> impl Iterator<Item = Line<'_, Map, Access>>
pub fn get_matching_lines( &self, key: &Access::KeyType, ) -> impl Iterator<Item = Line<'_, Map, Access>>
Return an iterator over all matching lines for a certain key.
Auto Trait Implementations§
impl<Map, Access> Freeze for Table<Map, Access>
impl<Map, Access> RefUnwindSafe for Table<Map, Access>where
Access: RefUnwindSafe,
Map: RefUnwindSafe,
impl<Map, Access> Send for Table<Map, Access>
impl<Map, Access> Sync for Table<Map, Access>
impl<Map, Access> Unpin for Table<Map, Access>
impl<Map, Access> UnwindSafe for Table<Map, Access>where
Access: UnwindSafe,
Map: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more