pub struct ElementKind {
pub id: &'static str,
pub label: &'static str,
pub label_plural: &'static str,
pub class: ElementClass,
pub role: Option<ElementRole>,
pub badge: &'static str,
}Expand description
Descriptor of one element kind in an engine’s catalog (spec §4.2).
The catalog is static and model-free, like the block catalog: an
application must be able to build its chrome — tables, filters, layer
toggles, legends — before any model is loaded. id follows the block-id
stability rule: removing one, or changing the meaning of one, is a
break on the order of a file-format break.
Fields§
§id: &'static strStable kind identifier, opaque to this layer.
label: &'static strHuman-facing singular name.
label_plural: &'static strHuman-facing plural name.
class: ElementClassThe kind’s element class.
role: Option<ElementRole>What the kind does in the network (spec §4.3), or None for a kind
that is not in the flow network at all — a rain gage conveys
nothing, and a curve or a control rule is not in it to begin with.
badge: &'static strOne- or two-character glyph for dense UI (markers, chips).
Trait Implementations§
Source§impl Clone for ElementKind
impl Clone for ElementKind
Source§fn clone(&self) -> ElementKind
fn clone(&self) -> ElementKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more