pub enum ParentType {
Primitive {
primitive: PrimitiveKind,
},
Custom {
name: String,
},
Qualified {
spec_alias: String,
inner: Box<ParentType>,
},
Ranged {
inner: Box<ParentType>,
},
List {
inner: Box<ParentType>,
},
}Expand description
Parent type in a type definition: built-in primitive or custom type name.
name is the declared type name (the data name that introduces this type).
For data temperature: measure, name = “temperature”, primitive = Measure.
Variants§
Primitive
Fields
§
primitive: PrimitiveKindCustom
Qualified
Parent type defined in another spec: spec_alias.inner (e.g. data x: finance.money).
inner must be ParentType::Primitive or ParentType::Custom, not nested ParentType::Qualified.
Ranged
Range over an element type: <inner> range (e.g. money range, date range).
Fields
§
inner: Box<ParentType>List
List of an element type: <inner> list (e.g. money list, money range list).
Fields
§
inner: Box<ParentType>Trait Implementations§
Source§impl Clone for ParentType
impl Clone for ParentType
Source§impl Debug for ParentType
impl Debug for ParentType
Source§impl<'de> Deserialize<'de> for ParentType
impl<'de> Deserialize<'de> for ParentType
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ParentType
impl Display for ParentType
impl Eq for ParentType
Source§impl Hash for ParentType
impl Hash for ParentType
Source§impl PartialEq for ParentType
impl PartialEq for ParentType
Source§impl Serialize for ParentType
impl Serialize for ParentType
impl StructuralPartialEq for ParentType
Auto Trait Implementations§
impl Freeze for ParentType
impl RefUnwindSafe for ParentType
impl Send for ParentType
impl Sync for ParentType
impl Unpin for ParentType
impl UnsafeUnpin for ParentType
impl UnwindSafe for ParentType
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<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<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.