Enum mentat_core::TypedValue
[−]
[src]
Represents a value that can be stored in a Mentat store.
Variants
Ref(Entid)
Boolean(bool)
Long(i64)
Double(OrderedFloat<f64>)
Instant(DateTime<Utc>)
String(ValueRc<String>)
Keyword(ValueRc<Keyword>)
Uuid(Uuid)
Methods
impl TypedValue
[src]
[−]
impl TypedValue
pub fn is_congruent_with<T: Into<Option<ValueType>>>(&self, t: T) -> bool
[src]
[−]
pub fn is_congruent_with<T: Into<Option<ValueType>>>(&self, t: T) -> bool
Returns true if the provided type is Some
and matches this value's type, or if the
provided type is None
.
pub fn matches_type(&self, t: ValueType) -> bool
[src]
pub fn matches_type(&self, t: ValueType) -> bool
pub fn value_type(&self) -> ValueType
[src]
pub fn value_type(&self) -> ValueType
pub fn typed_ns_keyword(ns: &str, name: &str) -> TypedValue
[src]
[−]
pub fn typed_ns_keyword(ns: &str, name: &str) -> TypedValue
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.
pub fn typed_string(s: &str) -> TypedValue
[src]
[−]
pub fn typed_string(s: &str) -> TypedValue
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.
pub fn current_instant() -> TypedValue
[src]
pub fn current_instant() -> TypedValue
pub fn instant(micros: i64) -> TypedValue
[src]
[−]
pub fn instant(micros: i64) -> TypedValue
Construct a new TypedValue::Instant
instance from the provided
microsecond timestamp.
impl TypedValue
[src]
[−]
impl TypedValue
pub fn into_known_entid(self) -> Option<KnownEntid>
[src]
pub fn into_known_entid(self) -> Option<KnownEntid>
pub fn into_entid(self) -> Option<Entid>
[src]
pub fn into_entid(self) -> Option<Entid>
pub fn into_kw(self) -> Option<ValueRc<Keyword>>
[src]
pub fn into_kw(self) -> Option<ValueRc<Keyword>>
pub fn into_boolean(self) -> Option<bool>
[src]
pub fn into_boolean(self) -> Option<bool>
pub fn into_long(self) -> Option<i64>
[src]
pub fn into_long(self) -> Option<i64>
pub fn into_double(self) -> Option<f64>
[src]
pub fn into_double(self) -> Option<f64>
pub fn into_instant(self) -> Option<DateTime<Utc>>
[src]
pub fn into_instant(self) -> Option<DateTime<Utc>>
pub fn into_timestamp(self) -> Option<i64>
[src]
pub fn into_timestamp(self) -> Option<i64>
pub fn into_string(self) -> Option<ValueRc<String>>
[src]
pub fn into_string(self) -> Option<ValueRc<String>>
pub fn into_c_string(self) -> Option<*mut c_char>
[src]
pub fn into_c_string(self) -> Option<*mut c_char>
pub fn into_kw_c_string(self) -> Option<*mut c_char>
[src]
pub fn into_kw_c_string(self) -> Option<*mut c_char>
pub fn into_uuid_c_string(self) -> Option<*mut c_char>
[src]
pub fn into_uuid_c_string(self) -> Option<*mut c_char>
pub fn into_uuid(self) -> Option<Uuid>
[src]
pub fn into_uuid(self) -> Option<Uuid>
pub fn into_uuid_string(self) -> Option<String>
[src]
pub fn into_uuid_string(self) -> Option<String>
Trait Implementations
impl From<KnownEntid> for TypedValue
[src]
[+]
impl From<KnownEntid> for TypedValue
impl Clone for TypedValue
[src]
[+]
impl Clone for TypedValue
impl Debug for TypedValue
[src]
[+]
impl Debug for TypedValue
impl Eq for TypedValue
[src]
impl Eq for TypedValue
impl Hash for TypedValue
[src]
[+]
impl Hash for TypedValue
impl Ord for TypedValue
[src]
[+]
impl Ord for TypedValue
impl PartialOrd for TypedValue
[src]
[+]
impl PartialOrd for TypedValue
impl PartialEq for TypedValue
[src]
[+]
impl PartialEq for TypedValue
impl From<bool> for TypedValue
[src]
[+]
impl From<bool> for TypedValue
impl From<DateTime<Utc>> for TypedValue
[src]
[+]
impl From<DateTime<Utc>> for TypedValue
impl From<Uuid> for TypedValue
[src]
[+]
impl From<Uuid> for TypedValue
impl<'a> From<&'a str> for TypedValue
[src]
[+]
impl<'a> From<&'a str> for TypedValue
impl From<Arc<String>> for TypedValue
[src]
[+]
impl From<Arc<String>> for TypedValue
impl From<Rc<String>> for TypedValue
[src]
[+]
impl From<Rc<String>> for TypedValue
impl From<Box<String>> for TypedValue
[src]
[+]
impl From<Box<String>> for TypedValue
impl From<String> for TypedValue
[src]
[+]
impl From<String> for TypedValue
impl From<Arc<Keyword>> for TypedValue
[src]
[+]
impl From<Arc<Keyword>> for TypedValue
impl From<Rc<Keyword>> for TypedValue
[src]
[+]
impl From<Rc<Keyword>> for TypedValue
impl From<Keyword> for TypedValue
[src]
[+]
impl From<Keyword> for TypedValue
impl From<u32> for TypedValue
[src]
[+]
impl From<u32> for TypedValue
impl From<i32> for TypedValue
[src]
[+]
impl From<i32> for TypedValue
impl From<f64> for TypedValue
[src]
[+]
impl From<f64> for TypedValue
Auto Trait Implementations
impl Send for TypedValue
impl Send for TypedValue
impl Sync for TypedValue
impl Sync for TypedValue