pub trait TangoElement: Element {
const ATTR_KIND: AttrDataKind;
const CMD_SCALAR_KIND: Option<CommandDataKind>;
const CMD_ARRAY_KIND: Option<CommandDataKind>;
// Required methods
fn wrap(format: ValueFormat<Self>) -> Value;
fn unwrap(data: Value) -> Result<ValueFormat<Self>, Value>;
fn unwrap_ref(data: &Value) -> Option<&ValueFormat<Self>>;
}Expand description
An element type Tango has: which variant of Value holds it, and what kinds it
is advertised as, see AttrData and CommandData.
Required Associated Constants§
Sourceconst ATTR_KIND: AttrDataKind
const ATTR_KIND: AttrDataKind
The kind of an attribute of such values.
Sourceconst CMD_SCALAR_KIND: Option<CommandDataKind>
const CMD_SCALAR_KIND: Option<CommandDataKind>
The kind of a command argument of one such value, absent if none can be.
Sourceconst CMD_ARRAY_KIND: Option<CommandDataKind>
const CMD_ARRAY_KIND: Option<CommandDataKind>
The kind of a command argument of an array of such values, absent if none can be.
Required Methods§
fn wrap(format: ValueFormat<Self>) -> Value
fn unwrap(data: Value) -> Result<ValueFormat<Self>, Value>
fn unwrap_ref(data: &Value) -> Option<&ValueFormat<Self>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".