pub struct Comment {
pub id: String,
pub file: String,
pub side: Side,
pub line: u32,
pub text: String,
pub created_at: String,
pub updated_at: String,
}Expand description
One review comment, anchored to a diff line.
Anchor identity is (file, side, line) where file is the post-image
path (crate::diff::FileDiff::anchor_path). Comment identity is id —
anchors may collide (several comments on one line), ids may not.
Fields§
§id: StringCaller-supplied unique id — the comment’s identity for upsert, delete, and import merging.
file: StringPost-image path of the file the comment anchors to.
side: SideWhich side of the diff line counts in.
line: u321-based line number on side.
text: StringThe comment body, verbatim; may span multiple lines.
created_at: StringCreation time, RFC 3339 UTC, caller-supplied; part of the stable sort order so threads on one line read chronologically.
updated_at: StringLast-edit time, RFC 3339 UTC, caller-supplied; drives merge conflict resolution (newer wins).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Comment
impl<'de> Deserialize<'de> for Comment
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 Eq for Comment
impl StructuralPartialEq for Comment
Auto Trait Implementations§
impl Freeze for Comment
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnsafeUnpin for Comment
impl UnwindSafe for Comment
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