Enum mentat_ffi::Binding
[−]
[src]
pub enum Binding { Scalar(TypedValue), Vec(Arc<Vec<Binding>>), Map(Arc<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(Arc<Vec<Binding>>)
Map(Arc<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>(&self, t: T) -> bool where
T: Into<Option<ValueType>>,
[src]
pub fn is_congruent_with<T>(&self, t: T) -> bool where
T: Into<Option<ValueType>>,
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<i64>
[src]
pub fn into_entid(self) -> Option<i64>
pub fn into_kw(self) -> Option<Arc<Keyword>>
[src]
pub fn into_kw(self) -> Option<Arc<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<Arc<String>>
[src]
pub fn into_string(self) -> Option<Arc<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 i8>
[src]
pub fn into_c_string(self) -> Option<*mut i8>
pub fn into_kw_c_string(self) -> Option<*mut i8>
[src]
pub fn into_kw_c_string(self) -> Option<*mut i8>
pub fn into_uuid_c_string(self) -> Option<*mut i8>
[src]
pub fn into_uuid_c_string(self) -> Option<*mut i8>
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 From<Vec<Binding>> for Binding
[src]
impl From<Vec<Binding>> for Binding
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) -> Binding
[src]
fn from(value: StructuredMap) -> Binding
Performs the conversion.
impl Eq for Binding
[src]
impl Eq for Binding
impl PartialEq<Binding> for Binding
[src]
impl PartialEq<Binding> 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 Debug for Binding
[src]
impl Debug for Binding