pub struct Ulid(/* private fields */);Expand description
A ULID: 26 characters (01J9Z3…), sortable
by creation time, stored as text. A good public id: short in URLs, and it
doesn’t reveal how many rows a table has. Ulid::default() is the empty
value of an unsaved model.
Implementations§
Trait Implementations§
Source§impl ColumnType for Ulid
impl ColumnType for Ulid
Source§const KIND: ColumnKind = ColumnKind::Text
const KIND: ColumnKind = ColumnKind::Text
The kind of column this type is stored in.
Source§impl<'de> Deserialize<'de> for Ulid
impl<'de> Deserialize<'de> for Ulid
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
From a path segment, a form field or JSON: an invalid ULID is an
error (a 404 through renox::Path).
impl Eq for Ulid
Source§impl ModelKey for Ulid
impl ModelKey for Ulid
Source§fn is_unsaved(&self) -> bool
fn is_unsaved(&self) -> bool
Whether this is the key of a model that isn’t saved yet.
Source§fn generate() -> Option<Self>
fn generate() -> Option<Self>
A new key for an insert, or
None when the database makes it
(auto-increment) or the app must set it (String).Source§const AUTO_INCREMENT: bool = false
const AUTO_INCREMENT: bool = false
The database makes the key on insert (
RETURNING id).Source§impl Ord for Ulid
impl Ord for Ulid
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Ulid
impl PartialOrd for Ulid
impl StructuralPartialEq for Ulid
Auto Trait Implementations§
impl Freeze for Ulid
impl RefUnwindSafe for Ulid
impl Send for Ulid
impl Sync for Ulid
impl Unpin for Ulid
impl UnsafeUnpin for Ulid
impl UnwindSafe for Ulid
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> Comparable<T> for Twhere
T: ToDbValue,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<K> ForeignKey<K> for Kwhere
K: ModelKey,
impl<K> ForeignKey<K> for Kwhere
K: ModelKey,
impl<T> FromDb for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more