pub struct Database {
data: AppData,
}
Fields§
§data: AppData
Implementations§
source§impl Database
impl Database
pub fn new() -> Self
pub fn create_data_dirs()
pub fn save(&self)
pub fn add_chat_id(&mut self, chat_id: i64)
pub fn remove_chat_id(&mut self, chat_id: i64)
pub fn update_chat_id(&mut self, old_id: i64, new_id: i64)
pub fn get_chat_ids(&self) -> Vec<i64>
pub fn chat_id_exists(&self, id: &i64) -> bool
pub fn get_api_id(&self) -> i32
pub fn get_api_hash(&self) -> &String
pub fn get_whisper_model(&self) -> &String
pub fn set_whisper_model(&mut self, new_model: &str) -> String
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
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