pub struct Sqlite { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Database for Sqlite
impl Database for Sqlite
fn upsert_deck(&self, deck: &Deck) -> Result<(), DatabaseError>
fn delete_decks<T: Into<Vec<String>>>( &self, names: T, ) -> Result<(), DatabaseError>
fn get_decks<T: Into<Vec<String>>>( &self, names: T, ) -> Result<Vec<Deck>, DatabaseError>
fn get_all_decks(&self) -> Result<Vec<Deck>, DatabaseError>
fn upsert_flashcard( &self, flashcard: &Flashcard, deck: &str, ) -> Result<(), DatabaseError>
fn get_all_flashcards( &self, deck: &str, ) -> Result<Vec<Flashcard>, DatabaseError>
fn get_flashcards<T: Into<Vec<u32>>>( &self, deck: &str, ids: T, ) -> Result<Vec<Flashcard>, DatabaseError>
fn delete_flashcards<T: Into<Vec<u32>>>( &self, ids: T, ) -> Result<(), DatabaseError>
fn move_flashcard(&self, id: u32, to_deck: &str) -> Result<(), DatabaseError>
fn save_review( &self, flashcard_id: u32, review: &Review, ) -> Result<(), DatabaseError>
fn import<T: Into<Vec<Deck>>>(&self, decks: T) -> Result<(), DatabaseError>
Auto Trait Implementations§
impl !Freeze for Sqlite
impl !RefUnwindSafe for Sqlite
impl Send for Sqlite
impl !Sync for Sqlite
impl Unpin for Sqlite
impl !UnwindSafe for Sqlite
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more