Struct memory_lol::db::Database
source · [−]pub struct Database<M> {
pub accounts: Arc<AccountTable<M>>,
pub screen_names: ScreenNameTable<M>,
}Fields
accounts: Arc<AccountTable<M>>screen_names: ScreenNameTable<M>Implementations
sourceimpl<M: Sync + Send + 'static> Database<M>
impl<M: Sync + Send + 'static> Database<M>
pub fn get_counts(
&self
) -> Result<(AccountTableCounts, ScreenNameTableCounts), Error>
pub fn lookup_by_user_id(
&self,
user_id: u64
) -> Result<HashMap<String, Vec<NaiveDate>>, Error>
pub fn lookup_by_screen_name(&self, screen_name: &str) -> Result<Vec<u64>, Error>
pub fn lookup_by_screen_name_prefix(
&self,
screen_name_prefix: &str,
limit: usize
) -> Result<Vec<(String, Vec<u64>)>, Error>
Auto Trait Implementations
impl<M> RefUnwindSafe for Database<M> where
M: RefUnwindSafe,
impl<M> Send for Database<M> where
M: Send + Sync,
impl<M> Sync for Database<M> where
M: Send + Sync,
impl<M> Unpin for Database<M> where
M: Unpin,
impl<M> UnwindSafe for Database<M> where
M: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more