pub struct SeededUlidGenerator { /* private fields */ }Expand description
A canister-owned or application-owned sequence seeded once at creation. Each newer millisecond starts at the stream’s seed. IDs are predictable.
Implementations§
Source§impl SeededUlidGenerator
impl SeededUlidGenerator
Sourcepub fn next_at(
&mut self,
timestamp: Timestamp,
) -> Result<Ulid, UlidGenerationError>
pub fn next_at( &mut self, timestamp: Timestamp, ) -> Result<Ulid, UlidGenerationError>
Issue at the timestamp already captured for an operation such as Batch::at.
Equal or earlier timestamps advance the suffix at the last logical millisecond.
§Errors
Returns the same timestamp or suffix refusal as UlidGenerator::generate.
A refusal preserves the stream position.
Auto Trait Implementations§
impl Forget for SeededUlidGenerator
impl Freeze for SeededUlidGenerator
impl Move for SeededUlidGenerator
impl RefUnwindSafe for SeededUlidGenerator
impl Send for SeededUlidGenerator
impl Sync for SeededUlidGenerator
impl Unpin for SeededUlidGenerator
impl UnsafeUnpin for SeededUlidGenerator
impl UnwindSafe for SeededUlidGenerator
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