pub struct Operation {
pub id: OperationId,
pub operation_type: OperationType,
pub parent: Option<OperationId>,
pub checkpoint_id: String,
pub timestamp: DateTime<Utc>,
pub description: Option<String>,
}Expand description
A single operation in the history graph
Fields§
§id: OperationIdUnique identifier
operation_type: OperationTypeType of operation with its specific data
parent: Option<OperationId>Parent operation ID (None for root)
checkpoint_id: StringCheckpoint ID created after this operation
timestamp: DateTime<Utc>When the operation was performed
description: Option<String>Optional description
Implementations§
Source§impl Operation
impl Operation
pub fn new( operation_type: OperationType, parent: Option<OperationId>, checkpoint_id: String, ) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sourcepub fn is_auto_detected(&self) -> bool
pub fn is_auto_detected(&self) -> bool
Check if this operation is auto-detected (user edit)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Operation
impl<'de> Deserialize<'de> for Operation
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 Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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