Skip to main content

RemoteThread

Struct RemoteThread 

Source
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: String

The forge’s thread id, opaque. GraphQL node id on GitHub, discussion id on GitLab.

§resolved: bool§outdated: bool

The 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: String

The 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

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> RemoteThread

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RemoteThread

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RemoteThread

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for RemoteThread

Source§

impl PartialEq for RemoteThread

Source§

fn eq(&self, other: &RemoteThread) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for RemoteThread

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RemoteThread

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.