Trait WriteBackend

Source
pub trait WriteBackend {
Show 19 methods // Required methods fn apply(&mut self, event: &BLEvents) -> bool; fn snapshot(&mut self) -> Option<u64>; fn load_snapshot(&mut self) -> Option<u64>; fn create_bill( &mut self, timestamp_from: i64, timestamp_to: i64, user_ids: UserGroup, comment: String, ) -> bool; fn create_item( &mut self, itemname: String, price_cents: u32, category: Option<String>, ) -> bool; fn create_user(&mut self, username: String) -> bool; fn update_item( &mut self, item_id: u32, itemname: String, price_cents: u32, category: Option<String>, ) -> bool; fn update_user( &mut self, user_id: u32, username: String, is_billed: bool, is_highlighted: bool, external_user_id: Option<String>, is_sepa: bool, ) -> bool; fn delete_user(&mut self, user_id: u32) -> bool; fn delete_item(&mut self, item_id: u32) -> bool; fn purchase( &mut self, user_id: u32, item_id: u32, millis_timestamp: i64, ) -> bool; fn special_purchase( &mut self, user_id: u32, special_name: String, millis_timestamp: i64, ) -> bool; fn cart_purchase( &mut self, user_id: u32, specials: Vec<String>, item_ids: Vec<u32>, millis_timestamp: i64, ) -> bool; fn ffa_purchase( &mut self, ffa_id: u64, item_id: u32, millis_timestamp: i64, ) -> bool; fn create_ffa( &mut self, allowed_categories: Vec<String>, allowed_drinks: Vec<u32>, allowed_number_total: u16, text_message: String, created_timestamp: i64, donor: u32, ) -> bool; fn create_free_budget( &mut self, cents_worth_total: u64, text_message: String, created_timestamp: i64, donor: u32, recipient: u32, ) -> bool; fn create_free_count( &mut self, allowed_categories: Vec<String>, allowed_drinks: Vec<u32>, allowed_number_total: u16, text_message: String, created_timestamp: i64, donor: u32, recipient: u32, ) -> bool; fn undo_purchase(&mut self, unique_id: u64) -> bool; fn reload(&mut self) -> Result<u64, RustixError>;
}

Required Methods§

Source

fn apply(&mut self, event: &BLEvents) -> bool

Source

fn snapshot(&mut self) -> Option<u64>

Source

fn load_snapshot(&mut self) -> Option<u64>

Source

fn create_bill( &mut self, timestamp_from: i64, timestamp_to: i64, user_ids: UserGroup, comment: String, ) -> bool

Source

fn create_item( &mut self, itemname: String, price_cents: u32, category: Option<String>, ) -> bool

Source

fn create_user(&mut self, username: String) -> bool

Source

fn update_item( &mut self, item_id: u32, itemname: String, price_cents: u32, category: Option<String>, ) -> bool

Source

fn update_user( &mut self, user_id: u32, username: String, is_billed: bool, is_highlighted: bool, external_user_id: Option<String>, is_sepa: bool, ) -> bool

Source

fn delete_user(&mut self, user_id: u32) -> bool

Source

fn delete_item(&mut self, item_id: u32) -> bool

Source

fn purchase( &mut self, user_id: u32, item_id: u32, millis_timestamp: i64, ) -> bool

Source

fn special_purchase( &mut self, user_id: u32, special_name: String, millis_timestamp: i64, ) -> bool

Source

fn cart_purchase( &mut self, user_id: u32, specials: Vec<String>, item_ids: Vec<u32>, millis_timestamp: i64, ) -> bool

Source

fn ffa_purchase( &mut self, ffa_id: u64, item_id: u32, millis_timestamp: i64, ) -> bool

Source

fn create_ffa( &mut self, allowed_categories: Vec<String>, allowed_drinks: Vec<u32>, allowed_number_total: u16, text_message: String, created_timestamp: i64, donor: u32, ) -> bool

Source

fn create_free_budget( &mut self, cents_worth_total: u64, text_message: String, created_timestamp: i64, donor: u32, recipient: u32, ) -> bool

Source

fn create_free_count( &mut self, allowed_categories: Vec<String>, allowed_drinks: Vec<u32>, allowed_number_total: u16, text_message: String, created_timestamp: i64, donor: u32, recipient: u32, ) -> bool

Source

fn undo_purchase(&mut self, unique_id: u64) -> bool

Source

fn reload(&mut self) -> Result<u64, RustixError>

Implementors§