pub enum DefaultKind {
Static(Value),
Now,
Uuid,
Sequence(String),
CustomName(String),
}Expand description
How a default value is produced when a row omits a column.
Variants§
Static(Value)
A fixed JSON value written literally.
Now
The current timestamp as an ISO-8601 string.
Uuid
A fresh UUIDv4 string.
Sequence(String)
The next value from a named sequence.
CustomName(String)
A user-defined default registered by name (resolved at runtime).
Trait Implementations§
Source§impl Clone for DefaultKind
impl Clone for DefaultKind
Source§fn clone(&self) -> DefaultKind
fn clone(&self) -> DefaultKind
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 moreSource§impl Debug for DefaultKind
impl Debug for DefaultKind
Source§impl<'de> Deserialize<'de> for DefaultKind
impl<'de> Deserialize<'de> for DefaultKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DefaultKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DefaultKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DefaultKind
impl PartialEq for DefaultKind
Source§fn eq(&self, other: &DefaultKind) -> bool
fn eq(&self, other: &DefaultKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DefaultKind
impl Serialize for DefaultKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DefaultKind
Auto Trait Implementations§
impl Freeze for DefaultKind
impl RefUnwindSafe for DefaultKind
impl Send for DefaultKind
impl Sync for DefaultKind
impl Unpin for DefaultKind
impl UnsafeUnpin for DefaultKind
impl UnwindSafe for DefaultKind
Blanket Implementations§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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