pub struct AttributeDescriptor {
pub key: String,
pub label: String,
pub kind: OptionKind,
pub quantity: Option<String>,
}Expand description
Description of one attribute an application may display for elements of a kind (spec §4.4).
Reuses the option-descriptor value vocabulary (OptionKind, spec
§3.2.1) and is advisory in exactly that sense: it tells a generic UI
what to show; it is not the validation authority, and an engine remains
free to hold data no schema advertises. This revision describes
attributes for display; editability, defaults, and creation flows
are a later additive revision.
Fields§
§key: StringField name in the element’s attribute data. Stable per kind; renaming one is a break, like a block id.
label: StringHuman-facing name.
kind: OptionKindValue shape and bounds.
quantity: Option<String>Key of the physical quantity the value carries (spec §5), or None
for dimensionless or textual attributes.
Trait Implementations§
Source§impl Clone for AttributeDescriptor
impl Clone for AttributeDescriptor
Source§fn clone(&self) -> AttributeDescriptor
fn clone(&self) -> AttributeDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttributeDescriptor
impl Debug for AttributeDescriptor
Source§impl<'de> Deserialize<'de> for AttributeDescriptor
impl<'de> Deserialize<'de> for AttributeDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AttributeDescriptor
impl PartialEq for AttributeDescriptor
Source§impl Serialize for AttributeDescriptor
impl Serialize for AttributeDescriptor
impl StructuralPartialEq for AttributeDescriptor
Auto Trait Implementations§
impl Freeze for AttributeDescriptor
impl RefUnwindSafe for AttributeDescriptor
impl Send for AttributeDescriptor
impl Sync for AttributeDescriptor
impl Unpin for AttributeDescriptor
impl UnsafeUnpin for AttributeDescriptor
impl UnwindSafe for AttributeDescriptor
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