pub struct Commit {
label: String,
ops: Vec<OpCodes>,
}Fields§
§label: StringSemantic label for review/undo grouping: “Moved 15 elements”.
ops: Vec<OpCodes>One gesture. An op’s index is its Seq in the total write order;
the Rev half is assigned when the commit is applied and lives
outside the payload.
Implementations§
Source§impl Commit
impl Commit
pub fn new(label: String, ops: Vec<OpCodes>) -> Self
pub fn label(&self) -> &str
pub fn ops(&self) -> &[OpCodes]
Sourcepub fn relabelled(self, label: String) -> Self
pub fn relabelled(self, label: String) -> Self
The same commit under a different label. Consuming, so a gesture that describes itself once its ops are known does not copy them.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Commit
impl<'de> Deserialize<'de> for Commit
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
impl StructuralPartialEq for Commit
Auto Trait Implementations§
impl Freeze for Commit
impl RefUnwindSafe for Commit
impl Send for Commit
impl Sync for Commit
impl Unpin for Commit
impl UnsafeUnpin for Commit
impl UnwindSafe for Commit
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