pub trait BackendEntry<Entry, Error> {
// Required methods
fn get<'life0, 'async_trait>(
&'life0 self,
id: Id,
) -> Pin<Box<dyn Future<Output = Result<Existing<Entry>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn all<'life0, 'async_trait>(
&'life0 self,
cursor: Id,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Existing<Entry>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create<'life0, 'async_trait>(
&'life0 self,
data: New<Entry>,
) -> Pin<Box<dyn Future<Output = Result<Id, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'async_trait>(
&'life0 self,
data: Existing<Entry>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove<'life0, 'async_trait>(
&'life0 self,
id: Id,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A database entry, or something that can be stored and retrieved from a database.
Required Methods§
Sourcefn get<'life0, 'async_trait>(
&'life0 self,
id: Id,
) -> Pin<Box<dyn Future<Output = Result<Existing<Entry>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
id: Id,
) -> Pin<Box<dyn Future<Output = Result<Existing<Entry>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get an entity of type with a specific id.
Sourcefn all<'life0, 'async_trait>(
&'life0 self,
cursor: Id,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Existing<Entry>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn all<'life0, 'async_trait>(
&'life0 self,
cursor: Id,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Existing<Entry>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all entities of type using offset cursor
Sourcefn create<'life0, 'async_trait>(
&'life0 self,
data: New<Entry>,
) -> Pin<Box<dyn Future<Output = Result<Id, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
data: New<Entry>,
) -> Pin<Box<dyn Future<Output = Result<Id, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new entity of type.