#[non_exhaustive]pub enum IdGeneration {
UuidV4,
UuidV7,
Ulid,
}Expand description
How generated code makes a new primary key value
(Conventions::primary_key_ids).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UuidV4
A random UUID (version 4), for UUID keys. Needs the uuid crate’s
v4 feature.
UuidV7
A time-ordered UUID (version 7), for UUID keys. Needs the uuid
crate’s v7 feature.
Ulid
A ULID: time-ordered, stored as a UUID in a UUID key, or as its
26-character text in a text key. Needs the ulid crate (with its
uuid feature for UUID keys).
Implementations§
Trait Implementations§
Source§impl Clone for IdGeneration
impl Clone for IdGeneration
impl Copy for IdGeneration
Source§impl Debug for IdGeneration
impl Debug for IdGeneration
impl Eq for IdGeneration
Source§impl Hash for IdGeneration
impl Hash for IdGeneration
Source§impl PartialEq for IdGeneration
impl PartialEq for IdGeneration
impl StructuralPartialEq for IdGeneration
Auto Trait Implementations§
impl Freeze for IdGeneration
impl RefUnwindSafe for IdGeneration
impl Send for IdGeneration
impl Sync for IdGeneration
impl Unpin for IdGeneration
impl UnsafeUnpin for IdGeneration
impl UnwindSafe for IdGeneration
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