pub struct ReviewThread {
pub id: String,
pub anchor: ReviewAnchor,
pub comments: Vec<ReviewComment>,
pub status: ReviewStatus,
pub created_at: String,
pub updated_at: String,
pub commit: Option<String>,
}Expand description
A persisted review thread: an anchor plus its comment chain and
lifecycle state; created_at / updated_at are rfc3339. commit is
the sha the thread was authored under (None = whole-diff scope);
#[serde(default)] loads pre-scope threads as whole-diff. Review
membership lives per-turn on ReviewComment::review_id, so one
thread can span several rounds of a conversation.
Fields§
§id: String§anchor: ReviewAnchor§comments: Vec<ReviewComment>§status: ReviewStatus§created_at: String§updated_at: String§commit: Option<String>Implementations§
Source§impl ReviewThread
impl ReviewThread
Sourcepub fn is_in_review(&self, review_id: &str) -> bool
pub fn is_in_review(&self, review_id: &str) -> bool
Whether any user turn is filed into review_id, i.e. whether this
thread is one of that review’s comments.
Sourcepub fn origin_review(&self) -> Option<&str>
pub fn origin_review(&self) -> Option<&str>
The review this thread first appeared in, driving the card’s stable
R# tag. None while nothing is filed yet.
Sourcepub fn latest_review(&self) -> Option<&str>
pub fn latest_review(&self) -> Option<&str>
The most recent review the thread has a turn in - the round a re-nudge is about.
Sourcepub fn awaits_reviewer(&self) -> bool
pub fn awaits_reviewer(&self) -> bool
Whether a worker’s answer on this thread is still waiting on the
reviewer. Open is excluded even when an agent turn is last: that
state is only reached by a reopen, which is the reviewer handing
the work back.
Sourcepub fn has_unfiled_user_turn(&self) -> bool
pub fn has_unfiled_user_turn(&self) -> bool
Whether the user has written a turn no review has sealed yet. This is what makes a thread submittable, whether it is a fresh comment or a reply on a thread already filed into an earlier review.
Trait Implementations§
Source§impl Clone for ReviewThread
impl Clone for ReviewThread
Source§impl Debug for ReviewThread
impl Debug for ReviewThread
Source§impl<'de> Deserialize<'de> for ReviewThread
impl<'de> Deserialize<'de> for ReviewThread
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 ReviewThread
Source§impl PartialEq for ReviewThread
impl PartialEq for ReviewThread
Source§impl Serialize for ReviewThread
impl Serialize for ReviewThread
impl StructuralPartialEq for ReviewThread
Auto Trait Implementations§
impl Freeze for ReviewThread
impl RefUnwindSafe for ReviewThread
impl Send for ReviewThread
impl Sync for ReviewThread
impl Unpin for ReviewThread
impl UnsafeUnpin for ReviewThread
impl UnwindSafe for ReviewThread
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.