pub struct RemoteThread {
pub id: String,
pub resolved: bool,
pub outdated: bool,
pub path: String,
pub side: String,
pub line: Option<u32>,
pub start_line: Option<u32>,
pub line_text: Option<String>,
pub anchor: Option<Anchor>,
pub comments: Vec<RemoteComment>,
}Expand description
One review thread: where the forge put it, and where this review did.
The forge’s coordinates are kept beside the anchor so a thread loaded from
a stale cache can be placed again against a newer plan — place is a pure
function of them and the document, and it runs on every open.
Fields§
§id: StringThe forge’s thread id, opaque. GraphQL node id on GitHub, discussion id on GitLab.
resolved: bool§outdated: boolThe forge says the line has left the request’s diff. Such a thread
has no line, and is placed by content or not at all.
path: StringThe file’s path in the request, which is the new path.
side: String"old" | "new", the review’s words for LEFT and RIGHT.
line: Option<u32>The last (or only) line, in the side’s numbering. None when outdated.
start_line: Option<u32>The first line of a multi-line thread.
line_text: Option<String>The text of line, when the forge recorded the diff around it. The
content key for a thread whose line is gone.
anchor: Option<Anchor>Where this review shows the thread. None until placed, and None
after placing when nothing in the plan holds it.
comments: Vec<RemoteComment>Implementations§
Source§impl RemoteThread
impl RemoteThread
Sourcepub fn root(&self) -> Option<&RemoteComment>
pub fn root(&self) -> Option<&RemoteComment>
The comment a reply is threaded under. GitHub replies to the root; GitLab replies to the discussion, whose id this thread already is.
Sourcepub fn is_twin_of(&self, finding: &Finding) -> bool
pub fn is_twin_of(&self, finding: &Finding) -> bool
Whether this thread holds finding, published from here: by the
address the publish recorded, or by the marker in a comment’s body,
which survives a publish whose answer was lost.
Sourcepub fn published_here(&self, finding: &str) -> Option<&RemoteComment>
pub fn published_here(&self, finding: &str) -> Option<&RemoteComment>
The comment in this thread that a finding’s publish made, if any.
Trait Implementations§
Source§impl Clone for RemoteThread
impl Clone for RemoteThread
Source§fn clone(&self) -> RemoteThread
fn clone(&self) -> RemoteThread
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RemoteThread
impl Debug for RemoteThread
Source§impl<'de> Deserialize<'de> for RemoteThread
impl<'de> Deserialize<'de> for RemoteThread
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 RemoteThread
Source§impl PartialEq for RemoteThread
impl PartialEq for RemoteThread
Source§impl Serialize for RemoteThread
impl Serialize for RemoteThread
impl StructuralPartialEq for RemoteThread
Auto Trait Implementations§
impl Freeze for RemoteThread
impl RefUnwindSafe for RemoteThread
impl Send for RemoteThread
impl Sync for RemoteThread
impl Unpin for RemoteThread
impl UnsafeUnpin for RemoteThread
impl UnwindSafe for RemoteThread
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.