pub enum PropertyType {
String,
Int,
Float,
Bool,
Date,
Datetime,
List(Box<PropertyType>),
Enum(SmolStr, Vec<SmolStr>),
Opaque(SmolStr),
Any,
}Expand description
The propertable-value type language. Intentionally simpler than the full Cypher value type — schemas describe what values are stored.
Variants map 1:1 to spec §8.2’s type lattice; the variant names
are self-documenting. #[allow(missing_docs)] applies to the
primitive variants; variants with nontrivial invariants
(Enum, Opaque) keep their own docstrings.
Variants§
String
Int
Float
Bool
Date
Datetime
List(Box<PropertyType>)
Enum(SmolStr, Vec<SmolStr>)
A closed enum carrying its name and variant names.
Spec §8.2 shape: Enum(SmolStr, Vec<SmolStr>) — tuple variant.
Opaque(SmolStr)
An opaque typed value the consumer chooses not to model structurally.
Unification invariant (spec §8.2): Opaque(n) unifies with
Opaque(n) (same symbolic name) and with PropertyType::Any;
every other pairing is a type error. This rule lives in the
unification layer (cyrs-sema); the shape here only carries the
symbolic name. Two opaque types with different names never unify.
Any
Fallback: any property value. Equivalent to “type unknown”.
Not in spec §8.2’s normative 9-variant set; retained as an
internal fallback for ReturnTy::Dynamic cloning. Consumers
should prefer the typed variants.
Trait Implementations§
Source§impl Clone for PropertyType
impl Clone for PropertyType
Source§fn clone(&self) -> PropertyType
fn clone(&self) -> PropertyType
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 PropertyType
impl Debug for PropertyType
Source§impl<'de> Deserialize<'de> for PropertyType
impl<'de> Deserialize<'de> for PropertyType
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 PartialEq for PropertyType
impl PartialEq for PropertyType
Source§fn eq(&self, other: &PropertyType) -> bool
fn eq(&self, other: &PropertyType) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PropertyType
impl Serialize for PropertyType
impl Eq for PropertyType
impl StructuralPartialEq for PropertyType
Auto Trait Implementations§
impl Freeze for PropertyType
impl RefUnwindSafe for PropertyType
impl Send for PropertyType
impl Sync for PropertyType
impl Unpin for PropertyType
impl UnsafeUnpin for PropertyType
impl UnwindSafe for PropertyType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.