Enum mentat::TypedValue [] [src]

pub enum TypedValue {
    Ref(i64),
    Boolean(bool),
    Long(i64),
    Double(OrderedFloat<f64>),
    Instant(DateTime<Utc>),
    String(Arc<String>),
    Keyword(Arc<Keyword>),
    Uuid(Uuid),
}

Represents a value that can be stored in a Mentat store.

Variants

Methods

impl TypedValue
[src]

Returns true if the provided type is Some and matches this value's type, or if the provided type is None.

Construct a new TypedValue::Keyword instance by cloning the provided values and wrapping them in a new ValueRc. This is expensive, so this might be best limited to tests.

Construct a new TypedValue::String instance by cloning the provided value and wrapping it in a new ValueRc. This is expensive, so this might be best limited to tests.

Construct a new TypedValue::Instant instance from the provided microsecond timestamp.

impl TypedValue
[src]

Trait Implementations

impl PartialOrd<TypedValue> for TypedValue
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Clone for TypedValue
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> From<&'a str> for TypedValue
[src]

Performs the conversion.

impl From<bool> for TypedValue
[src]

Performs the conversion.

impl From<Uuid> for TypedValue
[src]

Performs the conversion.

impl From<Box<String>> for TypedValue
[src]

Performs the conversion.

impl From<u32> for TypedValue
[src]

Performs the conversion.

impl From<Rc<Keyword>> for TypedValue
[src]

Performs the conversion.

impl From<Arc<String>> for TypedValue
[src]

Performs the conversion.

impl From<KnownEntid> for TypedValue
[src]

Performs the conversion.

impl From<f64> for TypedValue
[src]

Performs the conversion.

impl From<Keyword> for TypedValue
[src]

Performs the conversion.

impl From<DateTime<Utc>> for TypedValue
[src]

Truncate the provided DateTime to microsecond precision, and return the corresponding TypedValue::Instant.

Performs the conversion.

impl From<i32> for TypedValue
[src]

Performs the conversion.

impl From<String> for TypedValue
[src]

Performs the conversion.

impl From<Arc<Keyword>> for TypedValue
[src]

Performs the conversion.

impl From<Rc<String>> for TypedValue
[src]

Performs the conversion.

impl Ord for TypedValue
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

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

Deserialize this value from the given Serde deserializer. Read more

impl Hash for TypedValue
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Eq for TypedValue
[src]

impl PartialEq<TypedValue> for TypedValue
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for TypedValue
[src]

Formats the value using the given formatter. Read more

impl Serialize for TypedValue
[src]

Serialize this value into the given Serde serializer. Read more

impl TypedSQLValue for TypedValue
[src]

Given a SQLite value and a value_type_tag, return the corresponding TypedValue.

Given an EDN value, return a corresponding Mentat TypedValue.

An EDN Value does not encode a unique Mentat ValueType, so the composition from_edn_value(first(to_edn_value_pair(...))) loses information. Additionally, there are EDN values which are not Mentat typed values.

This function is deterministic.

Return the corresponding SQLite value and value_type_tag pair.

Return the corresponding EDN value and value_type pair.

impl TransactableValue for TypedValue
[src]

Coerce this value place into the given type. This is where we perform schema-aware coercion, for example coercing an integral value into a ref where appropriate. Read more

Make an entity place out of this value place. This is where we limit values in nested maps to valid entity places. Read more

impl FromThing<TypedValue> for TypedValueOr<TempIdHandle>
[src]

Auto Trait Implementations

impl Send for TypedValue

impl Sync for TypedValue