Enum atomic_lib::values::Value [−][src]
pub enum Value {
Show 14 variants
AtomicUrl(String),
Date(String),
Integer(i64),
Float(f64),
Markdown(String),
ResourceArraySubjects(Vec<String>),
ResourceArrayNested(Vec<Resource>),
Slug(String),
String(String),
Timestamp(i64),
NestedResource(PropVals),
Resource(Resource),
Boolean(bool),
Unsupported(UnsupportedValue),
}Expand description
An individual Value in an Atom, represented as a native Rust enum.
Variants
AtomicUrl(String)Tuple Fields of AtomicUrl
0: StringDate(String)Tuple Fields of Date
0: StringInteger(i64)Tuple Fields of Integer
0: i64Float(f64)Tuple Fields of Float
0: f64Markdown(String)Tuple Fields of Markdown
0: StringSlug(String)Tuple Fields of Slug
0: StringString(String)Tuple Fields of String
0: StringTimestamp(i64)Unix Epoch datetime in milliseconds
Tuple Fields of Timestamp
0: i64NestedResource(PropVals)Tuple Fields of NestedResource
0: PropValsResource(Resource)Tuple Fields of Resource
0: ResourceBoolean(bool)Tuple Fields of Boolean
0: boolUnsupported(UnsupportedValue)Tuple Fields of Unsupported
Implementations
Creates a new Value from an explicit DataType. Fails if the input string does not convert.
Returns a new Value, accepts a datatype string
Returns a Vector, if the Value is one
Returns an Integer, if the Atom is one.
Returns a PropVals Hashmap, if the Atom is a NestedResource
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Value
impl UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more