pub struct SqliteShortlistRepository { /* private fields */ }Implementations§
Source§impl SqliteShortlistRepository
impl SqliteShortlistRepository
pub fn new(db: Database) -> Self
Sourcepub fn contains(
&self,
question_id: &str,
paper_id: &str,
reader: &str,
) -> Result<bool, DbError>
pub fn contains( &self, question_id: &str, paper_id: &str, reader: &str, ) -> Result<bool, DbError>
Is this paper on reader’s shortlist for question_id?
Sourcepub fn toggle(
&self,
question_id: &str,
paper_id: &str,
reader: &str,
) -> Result<bool, DbError>
pub fn toggle( &self, question_id: &str, paper_id: &str, reader: &str, ) -> Result<bool, DbError>
Toggle membership. Returns the post-toggle state (true = on
shortlist). Matches the TUI’s c keybind and MCP
toggle_shortlist semantics. Does the whole check-and-swap
under one pool connection to avoid deadlocking the single-
connection in-memory test DB.
Trait Implementations§
Source§impl Clone for SqliteShortlistRepository
impl Clone for SqliteShortlistRepository
Source§fn clone(&self) -> SqliteShortlistRepository
fn clone(&self) -> SqliteShortlistRepository
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SqliteShortlistRepository
impl !RefUnwindSafe for SqliteShortlistRepository
impl Send for SqliteShortlistRepository
impl Sync for SqliteShortlistRepository
impl Unpin for SqliteShortlistRepository
impl UnsafeUnpin for SqliteShortlistRepository
impl !UnwindSafe for SqliteShortlistRepository
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