pub trait DiaryStore: Send + Sync {
// Required methods
fn append<'life0, 'async_trait>(
&'life0 self,
entry: DiaryEntry,
) -> Pin<Box<dyn Future<Output = Result<DiaryEntryId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn recent<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<DiaryEntry>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn all<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<DiaryEntry>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn count<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Asynchronous diary store.
Required Methods§
Sourcefn append<'life0, 'async_trait>(
&'life0 self,
entry: DiaryEntry,
) -> Pin<Box<dyn Future<Output = Result<DiaryEntryId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
entry: DiaryEntry,
) -> Pin<Box<dyn Future<Output = Result<DiaryEntryId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append a new entry.
Sourcefn recent<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<DiaryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recent<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<DiaryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List the most recent entries for a project (newest first).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".