Struct ate::dio::Dio [−][src]
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]
D: Serialize + DeserializeOwned + Clone + Send + Sync,
pub fn make<D>(&mut self, data: D) -> Result<DaoEthereal<D>, SerializationError> where
D: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
D: Serialize + DeserializeOwned + Clone + Send + Sync,
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]
&mut self,
data: D,
format: Option<MessageFormat>,
key: Option<PrimaryKey>
) -> Result<DaoEthereal<D>, SerializationError> where
D: Serialize + DeserializeOwned + Clone + Send + Sync,
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]
&mut self,
data: D,
format: Option<MessageFormat>,
key: Option<PrimaryKey>
) -> Result<Dao<D>, SerializationError> where
D: Serialize + DeserializeOwned + Clone + Send + Sync,
pub async fn delete<D>(&mut self, key: &PrimaryKey) -> Result<(), LoadError> where
D: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
D: Serialize + DeserializeOwned + Clone + Send + Sync,
pub async fn load<D>(&mut self, key: &PrimaryKey) -> Result<Dao<D>, LoadError> where
D: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
D: Serialize + DeserializeOwned + Clone + Send + Sync,
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,