pub struct StockSnapshots { /* private fields */ }Expand description
Stock snapshot operations.
Implementations§
Source§impl StockSnapshots
impl StockSnapshots
Sourcepub fn is_supported(&self) -> bool
pub fn is_supported(&self) -> bool
Whether stock snapshots are supported by the active backend.
Sourcepub fn capture(&self, input: CaptureStockSnapshot) -> Result<StockSnapshot>
pub fn capture(&self, input: CaptureStockSnapshot) -> Result<StockSnapshot>
Capture a new stock snapshot (totals computed from lines).
Sourcepub fn get(&self, id: StockSnapshotId) -> Result<Option<StockSnapshot>>
pub fn get(&self, id: StockSnapshotId) -> Result<Option<StockSnapshot>>
Get a snapshot by ID.
Sourcepub fn latest(&self) -> Result<Option<StockSnapshot>>
pub fn latest(&self) -> Result<Option<StockSnapshot>>
Get the most recent snapshot.
Sourcepub fn list(&self, filter: StockSnapshotFilter) -> Result<Vec<StockSnapshot>>
pub fn list(&self, filter: StockSnapshotFilter) -> Result<Vec<StockSnapshot>>
List snapshots (header-level) with optional pagination.
Sourcepub fn delete(&self, id: StockSnapshotId) -> Result<()>
pub fn delete(&self, id: StockSnapshotId) -> Result<()>
Delete a snapshot.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StockSnapshots
impl !UnwindSafe for StockSnapshots
impl Freeze for StockSnapshots
impl Send for StockSnapshots
impl Sync for StockSnapshots
impl Unpin for StockSnapshots
impl UnsafeUnpin for StockSnapshots
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