pub enum ValueContent {
Show 13 variants
Text(String),
Integer(i64),
Decimal(String),
Boolean(bool),
Date(DateValue),
Time(String),
Uri(String),
Color(String),
Geoname(String),
ListItem {
node_iri: String,
label: Option<String>,
},
Link {
target_iri: String,
target_label: Option<String>,
},
File(FileValue),
Raw {
value_type: String,
text: String,
},
}Expand description
The typed content of a single value (instance side).
Each variant corresponds to one entry in the value-type rendering matrix
(ADR-0013). Scalar arms hold a single extracted datum. ListItem and Link
additionally carry a resolved label (falling back to None on failure). File
covers all file-representation types. Raw is the long-tail fallback for any
value-type not in the named set — it never causes a hard error.
Variants§
Text(String)
Plain or standoff text — standoff XML stripped by the client boundary.
Integer(i64)
Integer number.
Decimal(String)
Decimal number — stored as a string to preserve precision.
Boolean(bool)
Boolean value.
Date(DateValue)
Calendar-aware date, possibly a range.
Time(String)
Point-in-time timestamp string (ISO 8601).
Uri(String)
URI string.
Color(String)
Hex colour string (e.g. "#ff0000").
Geoname(String)
GeoNames location code string.
ListItem
Reference to a controlled-vocabulary list node.
Fields
Link
Link to another resource instance.
Fields
File(FileValue)
File representation value (still-image, moving-image, audio, document, archive).
Raw
Long-tail fallback for value-types not covered by the named variants (e.g. interval, geometry). Never a hard error.
Implementations§
Source§impl ValueContent
impl ValueContent
Sourcepub fn value_type_token(&self) -> &str
pub fn value_type_token(&self) -> &str
Returns the dsp-cli kebab token for this value’s type.
Scalar arms return a &'static str literal. File borrows from the
inner FileValue.value_type. Raw borrows from the stored value_type
string. No allocation in any arm.
Trait Implementations§
Source§impl Clone for ValueContent
impl Clone for ValueContent
Source§fn clone(&self) -> ValueContent
fn clone(&self) -> ValueContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more