Enum GeneratedValue
pub enum GeneratedValue {
Now,
Uuid,
UuidText,
Cuid,
}Expand description
What cratestack generates for a @default(now()), @default(uuid())
or @default(cuid()) column (cratestack#1209). Chosen per field type at
codegen, so the value binds as the column’s own type.
Variants§
Now
now() on a DateTime field.
Uuid
uuid() on a Uuid field.
UuidText
uuid() on a String field: the hyphenated text form.
Cuid
cuid() on a Cuid or String field.
Implementations§
§impl GeneratedValue
impl GeneratedValue
§impl GeneratedValue
impl GeneratedValue
pub fn builtin(self) -> BuiltinDefault
pub fn builtin(self) -> BuiltinDefault
The cratestack function this value comes from.
Trait Implementations§
§impl Clone for GeneratedValue
impl Clone for GeneratedValue
§fn clone(&self) -> GeneratedValue
fn clone(&self) -> GeneratedValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GeneratedValue
§impl Debug for GeneratedValue
impl Debug for GeneratedValue
impl Eq for GeneratedValue
§impl PartialEq for GeneratedValue
impl PartialEq for GeneratedValue
impl StructuralPartialEq for GeneratedValue
Auto Trait Implementations§
impl Freeze for GeneratedValue
impl RefUnwindSafe for GeneratedValue
impl Send for GeneratedValue
impl Sync for GeneratedValue
impl Unpin for GeneratedValue
impl UnsafeUnpin for GeneratedValue
impl UnwindSafe for GeneratedValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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