pub enum Operation {
Show 13 variants
Replace {
target: Target,
find: String,
text: String,
occurrence: Option<u64>,
attached_comment: Option<AttachedComment>,
},
Insert {
target: Target,
text: String,
before_text: Option<String>,
after_text: Option<String>,
edge: Option<Edge>,
occurrence: Option<u64>,
attached_comment: Option<AttachedComment>,
},
Delete {
target: Target,
find: String,
occurrence: Option<u64>,
},
Rewrite {
target: Target,
before_sha256: String,
text: String,
attached_comment: Option<AttachedComment>,
},
InsertParagraph {
target: Target,
position: Side,
text: String,
attached_comment: Option<AttachedComment>,
},
DeleteParagraph {
target: Target,
},
Comment {
target: Target,
text: String,
find: Option<String>,
occurrence: Option<u64>,
through: Option<Target>,
},
ReplyComment {
target: Target,
text: String,
},
ResolveComment {
target: Target,
done: bool,
},
EditComment {
target: Target,
text: String,
},
DeleteComment {
target: Target,
include_replies: bool,
},
Strike {
target: Target,
},
Restore {
target: Target,
},
}Expand description
Typed requests in the text-and-review profile.
Literal occurrences are 1-based and count overlapping start positions. All active ranges resolve on one working baseline, not intermediate edits. Conflict detection, comment mapping and exact effects require preparation.
Variants§
Replace
Replace one exact literal range; empty text deletes only that range.
Fields
attached_comment: Option<AttachedComment>Comment on the nonempty resulting replacement.
Insert
Insert nonempty characters at exactly one declared working-text position.
Fields
attached_comment: Option<AttachedComment>Comment on the inserted text.
Delete
Delete one literal range. Whole-paragraph deletion is a separate kind.
Fields
Rewrite
Exact desired paragraph text with a mandatory working-basis guard.
Fields
before_sha256: StringSHA-256 of the effective working paragraph text after selected accept/reject decisions, checked before unchanged classification.
attached_comment: Option<AttachedComment>Comment on the complete nonempty resulting paragraph.
InsertParagraph
Insert a structural paragraph beside an existing anchor in its container.
Fields
attached_comment: Option<AttachedComment>Comment on the complete nonempty inserted paragraph.
DeleteParagraph
Explicit structural paragraph deletion, subject to container/tracking support.
Comment
New comment on a paragraph, exact literal, or same-story paragraph range.
Fields
ReplyComment
Reply to a surviving original comment; sibling replies retain array order.
ResolveComment
Explicit final thread state, applied after compatible replies.
Fields
EditComment
Replace a comment body, preserving its recorded attribution.
DeleteComment
Explicit removal; conflicts with mutations of the affected comment/thread.
Fields
Strike
Reject another author’s insertion visibly. The target names that revision.
Restore
Reject another author’s deletion visibly. The target names that revision.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Operation
impl<'de> Deserialize<'de> for Operation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Operation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Operation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Operation
Source§impl Serialize for Operation
impl Serialize for Operation
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Forget for Operation
impl Freeze for Operation
impl Move 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.