pub trait Definitions {
// Required method
fn structure(&self, url: &str) -> Option<Arc<Structure>>;
// Provided methods
fn covers(&self, url: &str) -> bool { ... }
fn templates(&self, url: &str) -> Vec<TemplateId> { ... }
}Expand description
Supplies structure definitions by canonical URL.
Required Methods§
Provided Methods§
Sourcefn covers(&self, url: &str) -> bool
fn covers(&self, url: &str) -> bool
Whether url belongs to a set of definitions this provider covers. When it does and
structure finds nothing, the structure does not exist; otherwise the
checker cannot tell and stays silent.
Sourcefn templates(&self, url: &str) -> Vec<TemplateId>
fn templates(&self, url: &str) -> Vec<TemplateId>
The templates through which the profile at url applies, for models that apply profiles
by template id (type-profile-style = cda): a value conforms when one of its
templateIds matches one of these. Empty for any other structure.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".