pub enum Value {
Show 18 variants
Unit,
Int(i64),
Float(f64),
Bool(bool),
Text(String),
List(Vec<Value>),
Opt(Option<Box<Value>>),
Enum(String),
Case {
case: String,
fields: Vec<(String, Value)>,
},
Ref(ResourceRef),
Actor(Actor),
Rich(RichText),
Error(String),
Map(Vec<(Value, Value)>),
Action(Offered),
Picture(Picture),
File(File),
Link {
reference: String,
title: String,
},
}Expand description
A value a node holds: the language’s values as a view shows them. Formatting (a date the person’s way, a number with their separators) is the host’s, so values travel as they are.
Variants§
Unit
Int(i64)
Float(f64)
Bool(bool)
Text(String)
List(Vec<Value>)
Opt(Option<Box<Value>>)
Enum(String)
A case of an enum, by name.
Case
A case of an enum whose cases carry fields, by name, with its fields by name: a
drawing’s arc.
Ref(ResourceRef)
Actor(Actor)
Rich(RichText)
Rich text, with how each reference in it reads for the person reading it.
Error(String)
What a failed or refused part of a view shows.
Map(Vec<(Value, Value)>)
A map’s entries, each key once, in key order.
Action(Offered)
An action offered to the person: how a control shows it, and the event of its node that choosing it fires.
Picture(Picture)
A picture: where its bytes are read from, and what it says to assistive technology.
File(File)
A file a person handed the window (dropped on it, or chosen): what it is called, its media type, its size and the content address its bytes are at.
Link
A record a view names: what refers to it, and how it reads for the person now.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
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>,
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Forget for Value
impl Freeze for Value
impl Move for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more