pub struct Schema {
pub types: Vec<TypeDef>,
pub records: Vec<Record>,
pub relations: Vec<Relation>,
pub protocol: Option<Protocol>,
}Expand description
A whole KDL schema file: standalone type definitions, entity / relation definitions, plus an optional protocol definition.
Fields§
§types: Vec<TypeDef>Standalone value-type definitions (struct / enum) in source order.
records: Vec<Record>Entity definitions (record) in source order — persisted tables with
identity.
relations: Vec<Relation>Graph edge definitions (relation) in source order — TYPE RELATION
tables connecting two records.
protocol: Option<Protocol>The protocol definition, if the file declares one. A file may contain only data types, only a protocol, or both.
Trait Implementations§
impl Eq for Schema
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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