Enum mentat_core::Binding
[−]
[src]
pub enum Binding { Scalar(TypedValue), Vec(ValueRc<Vec<Binding>>), Map(ValueRc<StructuredMap>), }
The values bound in a query specification can be:
- Vecs of structured values, for multi-valued component attributes or nested expressions.
- Single structured values, for single-valued component attributes or nested expressions.
- Single typed values, for simple attributes.
The Binding
enum defines these three options.
Datomic also supports structured inputs; at present Mentat does not, but this type would also serve that purpose.
Note that maps are not ordered, and so Binding
is neither Ord
nor PartialOrd
.
Variants
Scalar(TypedValue)
Vec(ValueRc<Vec<Binding>>)
Map(ValueRc<StructuredMap>)
Methods
impl Binding
[src]
impl Binding
pub fn val(self) -> Option<TypedValue>
[src]
pub fn val(self) -> Option<TypedValue>
impl Binding
[src]
impl Binding
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) -> Option<ValueType>
[src]
pub fn value_type(&self) -> Option<ValueType>
impl Binding
[src]
impl Binding
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_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>
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>
Trait Implementations
impl Clone for Binding
[src]
impl Clone for Binding
fn clone(&self) -> Binding
[src]
fn clone(&self) -> Binding
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Binding
[src]
impl Debug for Binding
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for Binding
[src]
impl Eq for Binding
impl PartialEq for Binding
[src]
impl PartialEq for Binding
fn eq(&self, __arg_0: &Binding) -> bool
[src]
fn eq(&self, __arg_0: &Binding) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Binding) -> bool
[src]
fn ne(&self, __arg_0: &Binding) -> bool
This method tests for !=
.
impl<T> From<T> for Binding where
T: Into<TypedValue>,
[src]
impl<T> From<T> for Binding where
T: Into<TypedValue>,
impl From<StructuredMap> for Binding
[src]
impl From<StructuredMap> for Binding
fn from(value: StructuredMap) -> Self
[src]
fn from(value: StructuredMap) -> Self
Performs the conversion.
impl From<Vec<Binding>> for Binding
[src]
impl From<Vec<Binding>> for Binding