pub enum Op {
Added,
Edited,
Renamed,
RenameEdited,
Deleted,
Unchanged,
Split,
Merged,
Copied,
Moved,
}Expand description
The op alphabet, exactly as schema/weave-ops.schema.json enumerates it.
It used to be a String, so a document saying "op": "eddited" decoded
without complaint and then fell through this crate’s match into the
“edited-ish” arm — an unknown verb silently treated as a known one. Being
an enum makes the whole vocabulary a parsing question, answered once, at the
boundary, before anything acts on it.
Variants§
Added
The entity is new in the changed file.
Edited
The entity’s text changed.
Renamed
The entity was renamed, its text otherwise unchanged.
RenameEdited
Renamed and edited in one step.
Deleted
The entity is gone from the changed file.
Unchanged
Carries no intent; a v1 producer never emits it.
Split
Reserved: relational, correlating several entity keys, which a per-key
matcher cannot express. A v1 consumer accepts them and acts on none —
which is a thing this type can now state rather than a thing the
match below happens to do.
Merged
Reserved. See Op::Split.
Copied
Reserved. See Op::Split.
Moved
Reserved. See Op::Split.
Implementations§
Trait Implementations§
impl Copy for Op
Source§impl<'de> Deserialize<'de> for Op
impl<'de> Deserialize<'de> for Op
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>,
impl Eq for Op
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more