Struct ate::dio::DaoEthereal[][src]

pub struct DaoEthereal<D> where
    Self: Send + Sync,
    D: Serialize + DeserializeOwned + Clone + Sync + Send
{ /* fields omitted */ }

Represents a data object that will be represented as one or more events on the redo-log and validated in the chain-of-trust.

Reading this object using none-mutable behavior will incur no IO on the redo-log however if you edit the object you must commit it to the Dio before it goes out of scope or the data will be lost (in Debug mode this will even trigger an assert).

Metadata about the data object can also be accessed via this object which allows you to change the read/write access rights, etc.

If you change your mind on commiting the data to the redo-log then you can call the cancel function instead.

The ethereal version represents all operations that can be performed before the obejct is actually saved

Implementations

impl<D> DaoEthereal<D> where
    Self: Send + Sync,
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

pub fn make(key: PrimaryKey, format: MessageFormat, data: D) -> DaoEthereal<D>[src]

pub fn detach(&mut self)[src]

pub fn attach(&mut self, parent: &dyn DaoObjReal, vec: DaoVec<D>)[src]

pub fn attach_orphaned(&mut self, parent: &PrimaryKey)[src]

pub fn take(self) -> D[src]

pub async fn try_lock<'a>(
    &mut self,
    dio: &mut Dio<'a>
) -> Result<bool, LockError>
[src]

pub async fn unlock<'a>(&mut self, dio: &mut Dio<'a>) -> Result<bool, LockError>[src]

pub fn commit<'a>(self, dio: &mut Dio<'a>) -> Result<Dao<D>, SerializationError>[src]

Trait Implementations

impl<D> DaoObjEthereal for DaoEthereal<D> where
    Self: Send + Sync,
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

impl<D: Debug> Debug for DaoEthereal<D> where
    Self: Send + Sync,
    D: Serialize + DeserializeOwned + Clone + Sync + Send
[src]

impl<D> Deref for DaoEthereal<D> where
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

type Target = D

The resulting type after dereferencing.

impl<D> DerefMut for DaoEthereal<D> where
    D: Serialize + DeserializeOwned + Clone + Send + Sync
[src]

Auto Trait Implementations

impl<D> RefUnwindSafe for DaoEthereal<D> where
    D: RefUnwindSafe

impl<D> Send for DaoEthereal<D>

impl<D> Sync for DaoEthereal<D>

impl<D> Unpin for DaoEthereal<D> where
    D: Unpin

impl<D> UnwindSafe for DaoEthereal<D> where
    D: UnwindSafe

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>,