Trait DB

Source
pub trait DB: Send {
Show 25 methods // Required methods fn load<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn dump<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn primary_key(&self) -> u64; fn set_primary_key(&mut self, primary_key: u64); fn recurrence_key(&self) -> u64; fn set_recurrence_key(&mut self, primary_key: u64); fn update<'life0, 'async_trait>( &'life0 mut self, record: Record, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_recurring<'life0, 'async_trait>( &'life0 mut self, record: RecurringRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<Record>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_recurring<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<RecurringRecord>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn delete<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn delete_recurrence<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn record<'life0, 'async_trait>( &'life0 mut self, record: Record, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn record_recurrence<'life0, 'async_trait>( &'life0 mut self, record: RecurringRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn insert_record<'life0, 'async_trait>( &'life0 mut self, record: Record, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn insert_recurrence<'life0, 'async_trait>( &'life0 mut self, record: RecurringRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_recurrence<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<RecurringRecord>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_recurrence<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_today<'life0, 'async_trait>( &'life0 mut self, include_completed: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_all<'life0, 'async_trait>( &'life0 mut self, include_completed: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn events_now<'life0, 'async_trait>( &'life0 mut self, last: Duration, include_completed: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn complete_task<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn next_key(&mut self) -> u64 { ... } fn next_recurrence_key(&mut self) -> u64 { ... } fn record_entry<'life0, 'async_trait>( &'life0 mut self, entry: EntryParser, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}

Required Methods§

Source

fn load<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn dump<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn primary_key(&self) -> u64

Source

fn set_primary_key(&mut self, primary_key: u64)

Source

fn recurrence_key(&self) -> u64

Source

fn set_recurrence_key(&mut self, primary_key: u64)

Source

fn update<'life0, 'async_trait>( &'life0 mut self, record: Record, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_recurring<'life0, 'async_trait>( &'life0 mut self, record: RecurringRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<Record>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_recurring<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<RecurringRecord>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete_recurrence<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn record<'life0, 'async_trait>( &'life0 mut self, record: Record, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn record_recurrence<'life0, 'async_trait>( &'life0 mut self, record: RecurringRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn insert_record<'life0, 'async_trait>( &'life0 mut self, record: Record, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn insert_recurrence<'life0, 'async_trait>( &'life0 mut self, record: RecurringRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_recurrence<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<RecurringRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_recurrence<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_today<'life0, 'async_trait>( &'life0 mut self, include_completed: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_all<'life0, 'async_trait>( &'life0 mut self, include_completed: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn events_now<'life0, 'async_trait>( &'life0 mut self, last: Duration, include_completed: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn complete_task<'life0, 'async_trait>( &'life0 mut self, primary_key: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn next_key(&mut self) -> u64

Source

fn next_recurrence_key(&mut self) -> u64

Source

fn record_entry<'life0, 'async_trait>( &'life0 mut self, entry: EntryParser, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§