pub struct FileDispenser { /* private fields */ }Expand description
File-backed dispenser using a TOML state file with advisory locking. This is the Phase 1 implementation per the distributed architecture spec.
Implementations§
Trait Implementations§
Source§impl Dispenser for FileDispenser
Available on crate feature native only.
impl Dispenser for FileDispenser
Available on crate feature
native only.Source§fn next(&self, object_type: &str) -> Result<u32>
fn next(&self, object_type: &str) -> Result<u32>
Get the next sequence number for the given object type.
Increments the counter atomically.
Source§fn peek(&self, object_type: &str) -> Result<u32>
fn peek(&self, object_type: &str) -> Result<u32>
Peek at the next sequence number without incrementing.
Source§fn state(&self) -> Result<DispenserState>
fn state(&self) -> Result<DispenserState>
Get the full current state (all counters).
Auto Trait Implementations§
impl Freeze for FileDispenser
impl RefUnwindSafe for FileDispenser
impl Send for FileDispenser
impl Sync for FileDispenser
impl Unpin for FileDispenser
impl UnsafeUnpin for FileDispenser
impl UnwindSafe for FileDispenser
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