pub enum InterpretedValue {
Money {
currency: CurrencyCode,
amount_minor: i64,
amount: f64,
},
Date {
date: CalendarDate,
},
Number {
value: f64,
unit: Option<String>,
},
MathExpression {
notation: MathExpressionNotation,
expression: String,
},
SourceCode {
language: Option<String>,
segment_kind: SourceCodeSegmentKind,
text: String,
},
Url {
url: String,
},
}Variants§
Implementations§
Source§impl InterpretedValue
impl InterpretedValue
pub fn number(value: f64, unit: Option<String>) -> Self
pub fn math_expression( notation: MathExpressionNotation, expression: impl Into<String>, ) -> Self
pub fn source_code( language: Option<String>, segment_kind: SourceCodeSegmentKind, text: impl Into<String>, ) -> Self
pub fn url(url: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for InterpretedValue
impl Clone for InterpretedValue
Source§fn clone(&self) -> InterpretedValue
fn clone(&self) -> InterpretedValue
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 InterpretedValue
impl Debug for InterpretedValue
Source§impl<'de> Deserialize<'de> for InterpretedValue
impl<'de> Deserialize<'de> for InterpretedValue
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 InterpretedValue
impl PartialEq for InterpretedValue
Source§impl Serialize for InterpretedValue
impl Serialize for InterpretedValue
impl StructuralPartialEq for InterpretedValue
Auto Trait Implementations§
impl Freeze for InterpretedValue
impl RefUnwindSafe for InterpretedValue
impl Send for InterpretedValue
impl Sync for InterpretedValue
impl Unpin for InterpretedValue
impl UnsafeUnpin for InterpretedValue
impl UnwindSafe for InterpretedValue
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