pub enum Ty {
Primitive(Prim),
Array(Box<Ty>),
Named(String),
Link(String),
Union(Vec<Ty>),
Literal(String),
}Expand description
A field type.
Variants§
Primitive(Prim)
A built-in primitive.
Array(Box<Ty>)
A homogeneous array of another type.
Named(String)
A reference to a TypeDef (struct / enum) by name — an
embedded value type.
Link(String)
A reference to a Record by name — a stored link (link<Name>
in KDL). Distinct from Self::Named: a link is a foreign key / edge
target, not an embedded value.
Union(Vec<Ty>)
A union of two or more alternative types (A | B | ... in KDL).
Members are kept in source order.
Literal(String)
A string-literal type ('value' in KDL). Used as a union member to
express closed string sets ('public' | 'private').
Trait Implementations§
impl Eq for Ty
impl StructuralPartialEq for Ty
Auto Trait Implementations§
impl Freeze for Ty
impl RefUnwindSafe for Ty
impl Send for Ty
impl Sync for Ty
impl Unpin for Ty
impl UnsafeUnpin for Ty
impl UnwindSafe for Ty
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