pub struct BookStore { /* private fields */ }Implementations§
Source§impl BookStore
impl BookStore
pub fn open(path: impl AsRef<Path>) -> Result<Self, BookStoreError>
pub async fn add( &self, user_id: &str, input: BookInput, ) -> Result<Book, BookStoreError>
pub async fn list(&self, user_id: &str) -> Result<Vec<Book>, BookStoreError>
pub async fn get(&self, user_id: &str, id: &str) -> Result<Book, BookStoreError>
pub async fn update( &self, user_id: &str, id: &str, update: BookUpdate, ) -> Result<Book, BookStoreError>
pub async fn remove( &self, user_id: &str, id: &str, ) -> Result<(), BookStoreError>
pub async fn set_preferred_libraries( &self, user_id: &str, libraries: &[(String, String)], ) -> Result<(), BookStoreError>
pub async fn preferred_libraries( &self, user_id: &str, ) -> Result<Vec<(String, String)>, BookStoreError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BookStore
impl !UnwindSafe for BookStore
impl Freeze for BookStore
impl Send for BookStore
impl Sync for BookStore
impl Unpin for BookStore
impl UnsafeUnpin for BookStore
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