pub struct Database { /* private fields */ }Implementations§
Source§impl Database
impl Database
pub fn new<P: AsRef<Path>>(db_path: P) -> Result<Self>
pub fn add_to_queue(&self, item: &QueueItem) -> Result<()>
pub fn get_queue(&self) -> Result<Vec<QueueItem>>
pub fn remove_from_queue(&self, uuid: &str) -> Result<()>
pub fn add_history(&self, history: &History) -> Result<()>
pub fn get_history(&self, limit: Option<usize>) -> Result<Vec<History>>
pub fn dump_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
Trait Implementations§
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