Struct ate::dio::Dio[][src]

pub struct Dio<'a> where
    Self: Send + Sync
{ /* fields omitted */ }

Represents a series of mutations that the user is making on a particular chain-of-trust with a specific set of facts attached to a session. All changes are stored in memory until the commit function is invoked which will feed them into the chain.

If you decide to abort the transaction then call the cancel function before it goes out of scope however if you mutate data and do not call commit then the data will be lost (or an assert will be triggerd when in Debug mode).

These objects are multi-thread safe and allow for very high concurrency through async operations.

When setting the scope for the DIO it will behave differently when the commit function is invoked based on what scope you set for the transaction.

Implementations

impl<'a> Dio<'a>[src]

pub fn store<D>(&mut self, data: D) -> Result<Dao<D>, SerializationError> where
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

pub fn make<D>(&mut self, data: D) -> Result<DaoEthereal<D>, SerializationError> where
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

pub fn make_ext<D>(
    &mut self,
    data: D,
    format: Option<MessageFormat>,
    key: Option<PrimaryKey>
) -> Result<DaoEthereal<D>, SerializationError> where
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

pub fn store_ext<D>(
    &mut self,
    data: D,
    format: Option<MessageFormat>,
    key: Option<PrimaryKey>
) -> Result<Dao<D>, SerializationError> where
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

pub async fn delete<D>(&mut self, key: &PrimaryKey) -> Result<(), LoadError> where
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

pub async fn load<D>(&mut self, key: &PrimaryKey) -> Result<Dao<D>, LoadError> where
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

pub async fn exists(&mut self, key: &PrimaryKey) -> bool[src]

impl<'a> Dio<'a>[src]

pub fn has_uncommitted(&self) -> bool[src]

pub fn cancel(&mut self)[src]

pub async fn commit(&mut self) -> Result<(), CommitError>[src]

Trait Implementations

impl<'a> Drop for Dio<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Dio<'a>

impl<'a> Send for Dio<'a>

impl<'a> Sync for Dio<'a>

impl<'a> Unpin for Dio<'a>

impl<'a> !UnwindSafe for Dio<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,