pub struct Operation<E: Entity> { /* private fields */ }Expand description
An collection of the shared data, every Operation track, and the specific
Operation data needed for an Entity's Operation.
Implementations§
Source§impl<E: Entity> Operation<E>
impl<E: Entity> Operation<E>
Return the author of this Operation.
Sourcepub fn operation_data(&self) -> &E::OperationData
pub fn operation_data(&self) -> &E::OperationData
Return the operation data of this Operation.
Sourcepub fn creation_time(&self) -> TimeStamp
pub fn creation_time(&self) -> TimeStamp
Return the Unix time stamp of this Operations creation.
Sourcepub fn metadata(&self) -> impl Iterator<Item = &(String, String)>
pub fn metadata(&self) -> impl Iterator<Item = &(String, String)>
Return the metadata of this Operation.
Sourcepub fn from_value(raw: Value, author: IdentityStub) -> Result<Self, Error>
pub fn from_value(raw: Value, author: IdentityStub) -> Result<Self, Error>
Parses this Operation from an JSON value.
§Errors
If the value does not conform to the expected JSON representation.
Trait Implementations§
Source§impl<'de, E: Entity> Deserialize<'de> for Operation<E>
impl<'de, E: Entity> Deserialize<'de> for Operation<E>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<E> Freeze for Operation<E>
impl<E> RefUnwindSafe for Operation<E>
impl<E> Send for Operation<E>
impl<E> Sync for Operation<E>
impl<E> Unpin for Operation<E>
impl<E> UnwindSafe for Operation<E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more