Trait mentat_db::types::TransactableValue
[−]
[src]
pub trait TransactableValue: Clone { fn into_typed_value(
self,
schema: &Schema,
value_type: ValueType
) -> Result<TypedValue>; fn into_entity_place(self) -> Result<EntityPlace<Self>>; fn as_tempid(&self) -> Option<TempId>; }
The transactor is tied to edn::ValueAndSpan
right now, but in the future we'd like to support
TypedValue
directly for programmatic use. TransactableValue
encapsulates the interface
value types (i.e., values in the value place) need to support to be transacted.
Required Methods
fn into_typed_value(
self,
schema: &Schema,
value_type: ValueType
) -> Result<TypedValue>
self,
schema: &Schema,
value_type: ValueType
) -> Result<TypedValue>
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.
fn into_entity_place(self) -> Result<EntityPlace<Self>>
Make an entity place out of this value place. This is where we limit values in nested maps to valid entity places.
fn as_tempid(&self) -> Option<TempId>
Implementations on Foreign Types
impl TransactableValue for ValueAndSpan
[src]
impl TransactableValue for ValueAndSpan
fn into_typed_value(
self,
schema: &Schema,
value_type: ValueType
) -> Result<TypedValue>
[src]
fn into_typed_value(
self,
schema: &Schema,
value_type: ValueType
) -> Result<TypedValue>
fn into_entity_place(self) -> Result<EntityPlace<Self>>
[src]
fn into_entity_place(self) -> Result<EntityPlace<Self>>
fn as_tempid(&self) -> Option<TempId>
[src]
fn as_tempid(&self) -> Option<TempId>
Implementors
impl TransactableValue for TypedValue