pub struct Model {
pub elements: Vec<Element>,
pub relations: Vec<Relation>,
pub deployment: Deployment,
}Expand description
What a front-end found, plus the externals the config adds.
Fields§
§elements: Vec<Element>§relations: Vec<Relation>§deployment: DeploymentImplementations§
Source§impl Model
impl Model
Sourcepub fn normalize(&mut self)
pub fn normalize(&mut self)
Sort elements by id, merge relations on (source, target)
(strongest kind, union of items, first technology), and sort
them. Every path to the emitter goes through here, so output
order never depends on discovery order.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Fail if two elements have the same id, or two ids that become the same LikeC4 identifier.
pub fn element(&self, id: &[String]) -> Option<&Element>
Trait Implementations§
impl Eq for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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