struct DBRepository<T: RepositoryItem> {
database: SqliteDatabase,
_marker: PhantomData<T>,
}
Fields§
§database: SqliteDatabase
§_marker: PhantomData<T>
Trait Implementations§
Source§impl<V: RepositoryItem + Serialize + DeserializeOwned> Repository<V> for DBRepository<V>
impl<V: RepositoryItem + Serialize + DeserializeOwned> Repository<V> for DBRepository<V>
Source§fn get<'life0, 'async_trait>(
&'life0 self,
key: String,
) -> Pin<Box<dyn Future<Output = Result<Option<V>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
key: String,
) -> Pin<Box<dyn Future<Output = Result<Option<V>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves an item from the repository by its key.
Source§fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<V>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<V>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all items in the repository.
Auto Trait Implementations§
impl<T> Freeze for DBRepository<T>
impl<T> !RefUnwindSafe for DBRepository<T>
impl<T> Send for DBRepository<T>
impl<T> Sync for DBRepository<T>
impl<T> Unpin for DBRepository<T>where
T: Unpin,
impl<T> !UnwindSafe for DBRepository<T>
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more