pub struct FlagStore { /* private fields */ }Implementations§
Source§impl FlagStore
impl FlagStore
pub fn open(path: impl AsRef<Path>) -> Self
Sourcepub fn remember(&self, flag: &Flag) -> Result<()>
pub fn remember(&self, flag: &Flag) -> Result<()>
Append one flag as a JSON line. Never rewrites prior entries — append-only, so a
revision (Flag::revises) is a new line pointing back, not an edit in place.
Sourcepub fn recall_all(&self) -> Result<Vec<Flag>>
pub fn recall_all(&self) -> Result<Vec<Flag>>
All flags, in insertion order.
Sourcepub fn reconfirm_count(&self, note_prefix: &str) -> Result<u32>
pub fn reconfirm_count(&self, note_prefix: &str) -> Result<u32>
How many affirms (trit=+1) have been recorded for a given note-prefix — the crate’s own reference implementation of “reconfirmed across multiple recalls” for badge::BadgeContext.
Auto Trait Implementations§
impl Freeze for FlagStore
impl RefUnwindSafe for FlagStore
impl Send for FlagStore
impl Sync for FlagStore
impl Unpin for FlagStore
impl UnsafeUnpin for FlagStore
impl UnwindSafe for FlagStore
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