pub struct ReceiptStore { /* private fields */ }Expand description
In-memory + optional disk bag of receipts, keyed by group → instance → history.
Implementations§
Source§impl ReceiptStore
impl ReceiptStore
pub fn new() -> Self
pub fn upsert(&self, receipt: WidgetRenderReceipt)
Sourcepub fn list(&self, group: &str) -> Vec<WidgetRenderReceipt>
pub fn list(&self, group: &str) -> Vec<WidgetRenderReceipt>
Latest receipt per instance (newest first).
Sourcepub fn history(&self, group: &str) -> Vec<WidgetRenderReceipt>
pub fn history(&self, group: &str) -> Vec<WidgetRenderReceipt>
Full history for a group (oldest → newest), capped by ring.
pub fn live_instances( &self, group: &str, widget_id: &str, max_age_ms: u64, ) -> Vec<String>
pub fn save_to_path(&self, path: &Path) -> Result<()>
pub fn load_from_path(&self, path: &Path)
Trait Implementations§
Source§impl Default for ReceiptStore
impl Default for ReceiptStore
Source§fn default() -> ReceiptStore
fn default() -> ReceiptStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ReceiptStore
impl RefUnwindSafe for ReceiptStore
impl Send for ReceiptStore
impl Sync for ReceiptStore
impl Unpin for ReceiptStore
impl UnsafeUnpin for ReceiptStore
impl UnwindSafe for ReceiptStore
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