#[non_exhaustive]pub enum PropertyDefaultValue {
Show 22 variants
Null,
Boolean(bool),
Integer(i64),
String(DbString),
Bytes(Vec<u8>),
List(Vec<Box<PropertyDefaultValue>>),
Record(Vec<PropertyDefaultRecordField>),
Uuid(DbString),
Json(DbString),
Float(u64),
Float32(u32),
ZonedDateTime(DbString),
LocalDateTime(DbString),
Date(DbString),
ZonedTime(DbString),
LocalTime(DbString),
Duration(DbString),
Uint(u64),
Int128(i128),
Uint128(u128),
Decimal(DbString),
Vector(Vec<u32>),
}Expand description
Persistable default-value descriptor for closed graph property declarations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Null
Null default.
Boolean(bool)
Boolean default.
Integer(i64)
Signed integer default.
String(DbString)
Database-string default.
Bytes(Vec<u8>)
Byte-string default.
List(Vec<Box<PropertyDefaultValue>>)
List default with recursively materializable default descriptors.
Record(Vec<PropertyDefaultRecordField>)
Open record default with recursively materializable field descriptors.
Uuid(DbString)
Canonical UUID text default.
Json(DbString)
Canonical JSON text default.
Float(u64)
Default floating-point value, stored as canonical IEEE 754 binary64 bits.
Float32(u32)
Distinct 32-bit floating-point value, stored as canonical IEEE 754 binary32 bits.
ZonedDateTime(DbString)
Zoned datetime default, stored as canonical temporal text.
LocalDateTime(DbString)
Local datetime default, stored as canonical temporal text.
Date(DbString)
Date default, stored as canonical temporal text.
ZonedTime(DbString)
Zoned time default, stored as canonical temporal text.
LocalTime(DbString)
Local time default, stored as canonical temporal text.
Duration(DbString)
Duration default, stored as canonical temporal text.
Uint(u64)
Unsigned integer default.
Int128(i128)
Signed 128-bit integer default.
Uint128(u128)
Unsigned 128-bit integer default.
Decimal(DbString)
Fixed-precision decimal default, stored as canonical decimal text.
Vector(Vec<u32>)
Dense vector default, stored as canonical IEEE 754 binary32 bits.
Implementations§
Source§impl PropertyDefaultValue
impl PropertyDefaultValue
Sourcepub fn to_value(&self) -> GraphResult<Value>
pub fn to_value(&self) -> GraphResult<Value>
Materialize this descriptor as a runtime value.
§Errors
Returns GraphError::Inconsistent if a persisted float default is not
finite, or if a persisted decimal/UUID/JSON/temporal default no longer
parses as a valid value.
Sourcepub fn from_value(value: &Value) -> Option<Self>
pub fn from_value(value: &Value) -> Option<Self>
Convert a runtime value into a persistable default descriptor.
Trait Implementations§
Source§impl Archive for PropertyDefaultValue
impl Archive for PropertyDefaultValue
Source§type Archived = ArchivedPropertyDefaultValue
type Archived = ArchivedPropertyDefaultValue
Source§type Resolver = PropertyDefaultValueResolver
type Resolver = PropertyDefaultValueResolver
Source§fn resolve(
&self,
resolver: <Self as Archive>::Resolver,
out: Place<<Self as Archive>::Archived>,
)
fn resolve( &self, resolver: <Self as Archive>::Resolver, out: Place<<Self as Archive>::Archived>, )
Source§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
serialize. Read moreSource§impl Clone for PropertyDefaultValue
impl Clone for PropertyDefaultValue
Source§fn clone(&self) -> PropertyDefaultValue
fn clone(&self) -> PropertyDefaultValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PropertyDefaultValue
impl Debug for PropertyDefaultValue
Source§impl<'de> Deserialize<'de> for PropertyDefaultValue
impl<'de> Deserialize<'de> for PropertyDefaultValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<__D: Fallible + ?Sized> Deserialize<PropertyDefaultValue, __D> for Archived<PropertyDefaultValue>where
__D::Error: Source,
bool: Archive,
<bool as Archive>::Archived: Deserialize<bool, __D>,
i64: Archive,
<i64 as Archive>::Archived: Deserialize<i64, __D>,
DbString: Archive,
<DbString as Archive>::Archived: Deserialize<DbString, __D>,
Vec<u8>: Archive,
<Vec<u8> as Archive>::Archived: Deserialize<Vec<u8>, __D>,
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
u32: Archive,
<u32 as Archive>::Archived: Deserialize<u32, __D>,
i128: Archive,
<i128 as Archive>::Archived: Deserialize<i128, __D>,
u128: Archive,
<u128 as Archive>::Archived: Deserialize<u128, __D>,
Vec<u32>: Archive,
<Vec<u32> as Archive>::Archived: Deserialize<Vec<u32>, __D>,
impl<__D: Fallible + ?Sized> Deserialize<PropertyDefaultValue, __D> for Archived<PropertyDefaultValue>where
__D::Error: Source,
bool: Archive,
<bool as Archive>::Archived: Deserialize<bool, __D>,
i64: Archive,
<i64 as Archive>::Archived: Deserialize<i64, __D>,
DbString: Archive,
<DbString as Archive>::Archived: Deserialize<DbString, __D>,
Vec<u8>: Archive,
<Vec<u8> as Archive>::Archived: Deserialize<Vec<u8>, __D>,
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
u32: Archive,
<u32 as Archive>::Archived: Deserialize<u32, __D>,
i128: Archive,
<i128 as Archive>::Archived: Deserialize<i128, __D>,
u128: Archive,
<u128 as Archive>::Archived: Deserialize<u128, __D>,
Vec<u32>: Archive,
<Vec<u32> as Archive>::Archived: Deserialize<Vec<u32>, __D>,
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<PropertyDefaultValue, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<PropertyDefaultValue, <__D as Fallible>::Error>
impl Eq for PropertyDefaultValue
Source§impl Hash for PropertyDefaultValue
impl Hash for PropertyDefaultValue
Source§impl PartialEq for PropertyDefaultValue
impl PartialEq for PropertyDefaultValue
Source§fn eq(&self, other: &PropertyDefaultValue) -> bool
fn eq(&self, other: &PropertyDefaultValue) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PropertyDefaultValue
impl Serialize for PropertyDefaultValue
Source§impl<__S> Serialize<__S> for PropertyDefaultValue
impl<__S> Serialize<__S> for PropertyDefaultValue
impl StructuralPartialEq for PropertyDefaultValue
Auto Trait Implementations§
impl Freeze for PropertyDefaultValue
impl RefUnwindSafe for PropertyDefaultValue
impl Send for PropertyDefaultValue
impl Sync for PropertyDefaultValue
impl Unpin for PropertyDefaultValue
impl UnsafeUnpin for PropertyDefaultValue
impl UnwindSafe for PropertyDefaultValue
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.