pub struct Datastore {Show 22 fields
pub version: u64,
pub user_id_counter: u32,
pub freeby_id_counter: u64,
pub item_id_counter: u32,
pub users: HashMap<u32, User>,
pub users_suffix_tree: MockKDTree,
pub items: HashMap<u32, Item>,
pub items_suffix_tree: MockKDTree,
pub purchases: Vec<Purchase>,
pub purchase_count: u64,
pub bills: Vec<Bill>,
pub top_user_scores: ScoredIdTreeMock,
pub top_users: HashSet<u32>,
pub highlighted_users: HashSet<u32>,
pub top_drinks_per_user: HashMap<u32, HashSet<u32>>,
pub drink_scores_per_user: HashMap<u32, ScoredIdTreeMock>,
pub balance_cost_per_user: HashMap<(u32, String), HashMap<(u32, String), u32>>,
pub balance_count_per_user: HashMap<(u32, String), HashMap<(u32, String), u32>>,
pub used_up_freebies: Vec<Freeby>,
pub open_freebies: HashMap<u32, Vec<Freeby>>,
pub open_ffa: Vec<Freeby>,
pub categories: HashSet<String>,
}Fields§
§version: u64§user_id_counter: u32§freeby_id_counter: u64§item_id_counter: u32§users: HashMap<u32, User>§users_suffix_tree: MockKDTree§items: HashMap<u32, Item>§items_suffix_tree: MockKDTree§purchases: Vec<Purchase>§purchase_count: u64§bills: Vec<Bill>§top_user_scores: ScoredIdTreeMock§top_users: HashSet<u32>§highlighted_users: HashSet<u32>§top_drinks_per_user: HashMap<u32, HashSet<u32>>§drink_scores_per_user: HashMap<u32, ScoredIdTreeMock>§balance_cost_per_user: HashMap<(u32, String), HashMap<(u32, String), u32>>§balance_count_per_user: HashMap<(u32, String), HashMap<(u32, String), u32>>§used_up_freebies: Vec<Freeby>§open_freebies: HashMap<u32, Vec<Freeby>>§open_ffa: Vec<Freeby>§categories: HashSet<String>Trait Implementations§
Source§impl DatastoreQueries for Datastore
impl DatastoreQueries for Datastore
fn get_purchase_timestamp(&self, purchase_id: u64) -> Option<i64>
fn top_user_ids(&self, n: u16) -> Vec<u32>
fn users_searchhit_ids(&self, searchterm: &str) -> Vec<u32>
fn items_searchhit_ids(&self, searchterm: &str) -> Vec<u32>
fn personal_log_filtered( &self, user_id: u32, millis_start_inclusive: i64, millis_end_exclusive: i64, ) -> Vec<Purchase>
fn global_log_filtered( &self, millis_start_inclusive: i64, millis_end_exclusive: i64, ) -> &[Purchase]
fn all_categories(&self) -> Vec<String>
fn top_item_ids(&self, user_id: u32, n: u8) -> Vec<u32>
fn bills_filtered( &self, user_id: Option<u32>, millis_start_inclusive: i64, millis_end_exclusive: i64, ) -> Vec<Bill>
fn get_mut_purchase(&mut self, id: &u64) -> Option<&mut Purchase>
fn get_mut_bill( &mut self, timestamp_from: i64, timestamp_to: i64, ) -> Option<&mut Bill>
fn get_bill_index( &mut self, timestamp_from: i64, timestamp_to: i64, ) -> Option<usize>
fn get_specials_to_bill( &self, timestamp_from: i64, timestamp_to: i64, ) -> Vec<u64>
fn get_users_to_bill(&self, timestamp_from: i64, timestamp_to: i64) -> Vec<u32>
fn get_un_set_users_to_bill( &self, timestamp_from: i64, timestamp_to: i64, ) -> Vec<u32>
fn get_unpriced_specials_to_bill( &self, timestamp_from: i64, timestamp_to: i64, ) -> Vec<u64>
fn get_bill(&self, timestamp_from: i64, timestamp_to: i64) -> Option<&Bill>
fn get_purchase_indices_to_bill(&self, bill: &Bill) -> Vec<usize>
fn remove_purchases_indices(&mut self, indices: Vec<usize>)
fn get_budget_freeby_id_useable_for(&self, recipient_id: u32) -> Option<usize>
fn get_count_freeby_id_useable_for( &self, recipient_id: u32, item: u32, ) -> Option<usize>
fn get_ffa_freeby(&self, id: u64) -> Option<&Freeby>
fn get_personal_freeby( &self, recipient_id: u32, freeby_id: u64, ) -> Option<&Freeby>
Source§impl<'de> Deserialize<'de> for Datastore
impl<'de> Deserialize<'de> for Datastore
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Purchaseable for Datastore
impl Purchaseable for Datastore
Source§impl SuffixTreeRebuildable for Datastore
impl SuffixTreeRebuildable for Datastore
fn rebuild_user_tree(&self)
fn rebuild_item_tree(&self)
Auto Trait Implementations§
impl Freeze for Datastore
impl RefUnwindSafe for Datastore
impl Send for Datastore
impl Sync for Datastore
impl Unpin for Datastore
impl UnwindSafe for Datastore
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