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.
ParentType::Custom is a bare type or Spec name. Pin and @repo live on
uses, not on a list or type parent (uses tax_bracket 2024 then
data brackets: tax_bracket list).
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>Implementations§
Trait Implementations§
Source§impl Clone for ParentType
impl Clone for ParentType
Source§impl Debug for ParentType
impl Debug for ParentType
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
impl StructuralPartialEq for ParentType
Auto Trait Implementations§
impl Forget for ParentType
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,
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.