pub struct EntityIdBuilder<T: Prefix, I: Identifier> { /* private fields */ }Expand description
Builder for creating EntityIds
Implementations§
Source§impl<T: Prefix, I: Identifier> EntityIdBuilder<T, I>
impl<T: Prefix, I: Identifier> EntityIdBuilder<T, I>
Source§impl<T: Prefix> EntityIdBuilder<T, UuidIdentifier>
impl<T: Prefix> EntityIdBuilder<T, UuidIdentifier>
Sourcepub fn with_uuid_v4(self) -> Self
pub fn with_uuid_v4(self) -> Self
Set a UUID v4 (random)
Sourcepub fn with_uuid_v5(self, namespace: &Uuid, name: &str) -> Self
pub fn with_uuid_v5(self, namespace: &Uuid, name: &str) -> Self
Set a UUID v5 (name-based)
Source§impl<T: Prefix> EntityIdBuilder<T, UlidIdentifier>
impl<T: Prefix> EntityIdBuilder<T, UlidIdentifier>
Sourcepub fn with_timestamp(self, timestamp_ms: u64) -> Self
pub fn with_timestamp(self, timestamp_ms: u64) -> Self
Set a ULID with a specific timestamp
Sourcepub fn with_monotonic_from(
self,
previous: Option<&EntityId<T, UlidIdentifier>>,
) -> Self
pub fn with_monotonic_from( self, previous: Option<&EntityId<T, UlidIdentifier>>, ) -> Self
Set a monotonic ULID based on a previous one
Trait Implementations§
Source§impl<T: Prefix, I: Identifier> Default for EntityIdBuilder<T, I>
impl<T: Prefix, I: Identifier> Default for EntityIdBuilder<T, I>
Auto Trait Implementations§
impl<T, I> Freeze for EntityIdBuilder<T, I>where
I: Freeze,
impl<T, I> RefUnwindSafe for EntityIdBuilder<T, I>where
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, I> Send for EntityIdBuilder<T, I>
impl<T, I> Sync for EntityIdBuilder<T, I>
impl<T, I> Unpin for EntityIdBuilder<T, I>
impl<T, I> UnwindSafe for EntityIdBuilder<T, I>where
I: UnwindSafe,
T: UnwindSafe,
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