Skip to main content

DocView

Trait DocView 

Source
pub trait DocView {
    // Required methods
    fn entity(&self, id: EntityId) -> Option<&Entity>;
    fn constraint(&self, id: ConstraintId) -> Option<&Constraint>;
    fn layer(&self, id: LayerId) -> Option<&Layer>;
    fn group(&self, id: GroupId) -> Option<&Group>;
    fn settings(&self) -> &Settings;
}
Expand description

Read-only view of document content.

Required Methods§

Source

fn entity(&self, id: EntityId) -> Option<&Entity>

Entity by ID.

Source

fn constraint(&self, id: ConstraintId) -> Option<&Constraint>

Constraint by ID.

Source

fn layer(&self, id: LayerId) -> Option<&Layer>

Layer by ID.

Source

fn group(&self, id: GroupId) -> Option<&Group>

Group by ID.

Source

fn settings(&self) -> &Settings

Settings.

Trait Implementations§

Source§

impl Debug for dyn DocView + '_

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl DocView for Document

Implementors§