Struct ate::dio::Dao [−][src]
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.
Implementations
impl<D> Dao<D> where
Self: Send + Sync,
D: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
Self: Send + Sync,
D: Serialize + DeserializeOwned + Clone + Send + Sync,
pub fn make(key: PrimaryKey, format: MessageFormat, data: D) -> Dao<D>
[src]
pub fn detach(&mut self)
[src]
pub fn attach(&mut self, parent: &dyn DaoObj, vec: DaoVec<D>)
[src]
pub fn take(self) -> D
[src]
pub async fn try_lock<'a>(
&mut self,
dio: &mut Dio<'a>
) -> Result<bool, LockError>
[src]
&mut self,
dio: &mut Dio<'a>
) -> Result<bool, LockError>
pub async fn try_lock_then_delete<'a>(
&mut self,
dio: &mut Dio<'a>
) -> Result<bool, LockError>
[src]
&mut self,
dio: &mut Dio<'a>
) -> Result<bool, LockError>
pub async fn unlock<'a>(&mut self, dio: &mut Dio<'a>) -> Result<bool, LockError>
[src]
impl<D> Dao<D> where
D: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
D: Serialize + DeserializeOwned + Clone + Send + Sync,
pub async fn iter<'a, C>(
&self,
dio: &mut Dio<'a>,
vec: DaoVec<C>
) -> Result<Iter<C>, LoadError> where
C: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
&self,
dio: &mut Dio<'a>,
vec: DaoVec<C>
) -> Result<Iter<C>, LoadError> where
C: Serialize + DeserializeOwned + Clone + Send + Sync,
pub fn push<C>(
&mut self,
dio: &mut Dio<'_>,
vec: DaoVec<C>,
data: C
) -> Result<Dao<C>, SerializationError> where
C: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
&mut self,
dio: &mut Dio<'_>,
vec: DaoVec<C>,
data: C
) -> Result<Dao<C>, SerializationError> where
C: Serialize + DeserializeOwned + Clone + Send + Sync,
impl<D> Dao<D> where
D: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
D: Serialize + DeserializeOwned + Clone + Send + Sync,
pub fn bus<'a, C>(&self, chain: &'a Chain, vec: DaoVec<C>) -> Bus<'a, C> where
C: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
C: Serialize + DeserializeOwned + Clone + Send + Sync,
Trait Implementations
impl<D> DaoObj for Dao<D> where
Self: Send + Sync,
D: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
Self: Send + Sync,
D: Serialize + DeserializeOwned + Clone + Send + Sync,
fn key(&self) -> &PrimaryKey
[src]
fn delete<'a>(self, dio: &mut Dio<'a>) -> Result<(), SerializationError>
[src]
fn auth(&self) -> &MetaAuthorization
[src]
fn auth_mut(&mut self) -> &mut MetaAuthorization
[src]
fn add_extra_metadata(&mut self, meta: CoreMetadata)
[src]
fn is_locked(&self) -> bool
[src]
fn is_dirty(&self) -> bool
[src]
fn when_created(&self) -> u64
[src]
fn when_updated(&self) -> u64
[src]
fn cancel(&mut self)
[src]
fn commit<'a>(&mut self, dio: &mut Dio<'a>) -> Result<(), SerializationError>
[src]
impl<D: Debug> Debug for Dao<D> where
Self: Send + Sync,
D: Serialize + DeserializeOwned + Clone + Sync + Send,
[src]
Self: Send + Sync,
D: Serialize + DeserializeOwned + Clone + Sync + Send,
impl<D> Deref for Dao<D> where
D: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
D: Serialize + DeserializeOwned + Clone + Send + Sync,
impl<D> DerefMut for Dao<D> where
D: Serialize + DeserializeOwned + Clone + Send + Sync,
[src]
D: Serialize + DeserializeOwned + Clone + Send + Sync,
Auto Trait Implementations
impl<D> RefUnwindSafe for Dao<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for Dao<D>
impl<D> Sync for Dao<D>
impl<D> Unpin for Dao<D> where
D: Unpin,
D: Unpin,
impl<D> UnwindSafe for Dao<D> where
D: UnwindSafe,
D: UnwindSafe,
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>,