Struct datamodel_renderer::datamodel::Datamodel
source · pub struct Datamodel<'a> { /* private fields */ }
Expand description
The PSL data model declaration.
Implementations§
source§impl<'a> Datamodel<'a>
impl<'a> Datamodel<'a>
sourcepub fn push_model(&mut self, model: Model<'a>)
pub fn push_model(&mut self, model: Model<'a>)
Add a model block to the data model.
ⓘ
model Foo { // <
id Int @id // < this
} // <
sourcepub fn push_enum(&mut self, enum: Enum<'a>)
pub fn push_enum(&mut self, enum: Enum<'a>)
Add an enum block to the data model.
ⓘ
enum Foo { // <
Bar // < this
} // <
sourcepub fn push_view(&mut self, view: View<'a>)
pub fn push_view(&mut self, view: View<'a>)
Add a view block to the data model.
ⓘ
view Foo { // <
id Int @id // < this
} // <
sourcepub fn push_composite_type(&mut self, composite_type: CompositeType<'a>)
pub fn push_composite_type(&mut self, composite_type: CompositeType<'a>)
Add a composite type block to the data model.
ⓘ
type Address { // <
street String // < this
} // <
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Datamodel<'a>
impl<'a> Send for Datamodel<'a>
impl<'a> Sync for Datamodel<'a>
impl<'a> Unpin for Datamodel<'a>
impl<'a> UnwindSafe for Datamodel<'a>
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