pub struct ActionWithMeta<Action> { /* private fields */ }Expand description
Action with additional metadata like: id.
Implementations§
Source§impl<Action> ActionWithMeta<Action>
impl<Action> ActionWithMeta<Action>
pub fn meta(&self) -> &ActionMeta
pub fn action(&self) -> &Action
pub fn id(&self) -> ActionId
Sourcepub fn depth(&self) -> RecursionDepth
pub fn depth(&self) -> RecursionDepth
Recursion depth of a given action.
pub fn time(&self) -> Timestamp
pub fn sys_time(&self) -> SystemTime
pub fn time_as_nanos(&self) -> u64
pub fn duration_since_epoch(&self) -> Duration
pub fn duration_since(&self, other: &ActionWithMeta<Action>) -> Duration
Sourcepub fn split(self) -> (Action, ActionMeta)
pub fn split(self) -> (Action, ActionMeta)
Splits the struct into a tuple of action and it’s metadata.
Trait Implementations§
Source§impl<Action: Clone> Clone for ActionWithMeta<Action>
impl<Action: Clone> Clone for ActionWithMeta<Action>
Source§fn clone(&self) -> ActionWithMeta<Action>
fn clone(&self) -> ActionWithMeta<Action>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Action: Debug> Debug for ActionWithMeta<Action>
impl<Action: Debug> Debug for ActionWithMeta<Action>
Source§impl<'de, Action> Deserialize<'de> for ActionWithMeta<Action>where
Action: Deserialize<'de>,
impl<'de, Action> Deserialize<'de> for ActionWithMeta<Action>where
Action: Deserialize<'de>,
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<Action> Freeze for ActionWithMeta<Action>where
Action: Freeze,
impl<Action> RefUnwindSafe for ActionWithMeta<Action>where
Action: RefUnwindSafe,
impl<Action> Send for ActionWithMeta<Action>where
Action: Send,
impl<Action> Sync for ActionWithMeta<Action>where
Action: Sync,
impl<Action> Unpin for ActionWithMeta<Action>where
Action: Unpin,
impl<Action> UnwindSafe for ActionWithMeta<Action>where
Action: UnwindSafe,
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