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: String
Date(String)

Tuple Fields of Date

0: String
Integer(i64)

Tuple Fields of Integer

0: i64
Float(f64)

Tuple Fields of Float

0: f64
Markdown(String)

Tuple Fields of Markdown

0: String
ResourceArraySubjects(Vec<String>)

Tuple Fields of ResourceArraySubjects

0: Vec<String>
ResourceArrayNested(Vec<Resource>)

Tuple Fields of ResourceArrayNested

0: Vec<Resource>
Slug(String)

Tuple Fields of Slug

0: String
String(String)

Tuple Fields of String

0: String
Timestamp(i64)

Unix Epoch datetime in milliseconds

Tuple Fields of Timestamp

0: i64
NestedResource(PropVals)

Tuple Fields of NestedResource

0: PropVals
Resource(Resource)

Tuple Fields of Resource

0: Resource
Boolean(bool)

Tuple Fields of Boolean

0: bool
Unsupported(UnsupportedValue)

Tuple Fields of Unsupported

0: UnsupportedValue

Implementations

Returns the datatype for the value

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.