[][src]Enum atomic_lib::values::Value

pub enum Value {
    AtomicUrl(String),
    Date(String),
    Integer(isize),
    Markdown(String),
    ResourceArray(Vec<String>),
    Slug(String),
    String(String),
    Timestamp(i64),
    NestedResource(PropVals),
    Boolean(bool),
    Unsupported(UnsupportedValue),
}

An individual Value in an Atom, represented as a native Rust enum.

Variants

AtomicUrl(String)
Date(String)
Integer(isize)
Markdown(String)
ResourceArray(Vec<String>)
Slug(String)
String(String)
Timestamp(i64)
NestedResource(PropVals)
Boolean(bool)
Unsupported(UnsupportedValue)

Implementations

impl Value[src]

pub fn new(value: &str, datatype: &DataType) -> AtomicResult<Value>[src]

Creates a new Value from an explicit DataType. Fails if the input string does not convert.

pub fn new_from_string(value: &str, datatype: &str) -> AtomicResult<Value>[src]

Returns a new Value, accepts a datatype string

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl<'de> Deserialize<'de> for Value[src]

impl Display for Value[src]

impl From<HashMap<String, Value, RandomState>> for Value[src]

impl From<String> for Value[src]

impl From<Vec<String>> for Value[src]

impl From<bool> for Value[src]

impl From<i32> for Value[src]

impl From<u64> for Value[src]

impl From<usize> for Value[src]

impl Serialize for Value[src]

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,