pub struct CommentOp {
pub file: PathBuf,
pub hash: String,
pub op: OpKind,
pub text: Option<String>,
pub lines: Option<[usize; 2]>,
}Expand description
One op in an apply batch, resolved by hash alone – pre-1.0, there is no span field and
no fallback.
hash is looked up against a fresh comments list of file at apply time, so a batch
built before a sibling op shifted the file’s byte offsets still resolves correctly (see
apply’s per-file hash table).
Fields§
§file: PathBuf§hash: StringThe hash comments list reported for this span. The only thing that identifies which
span this op targets.
op: OpKind§text: Option<String>Required for replace. Read-only context on keep/delete (ignored by apply) –
comments list --format batch fills it with the span’s current text so a worker can
read what it’s deciding about without a second lookup.
lines: Option<[usize; 2]>Read-only context from comments list --format batch; ignored by apply.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CommentOp
impl<'de> Deserialize<'de> for CommentOp
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 CommentOp
impl RefUnwindSafe for CommentOp
impl Send for CommentOp
impl Sync for CommentOp
impl Unpin for CommentOp
impl UnsafeUnpin for CommentOp
impl UnwindSafe for CommentOp
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