pub enum ReviewSource {
WorkingTree,
Commit {
oid: String,
},
Range {
oldest: String,
newest: String,
},
Pr {
number: u64,
},
Against {
rev: String,
},
Walkthrough {
id: String,
},
}Variants§
WorkingTree
Commit
Range
Pr
A forge pull request. The diff renders as a range resolved at open time, but review state keys on the PR number so it survives pushes.
Against
Everything the working tree carries over rev, three-dot. rev is
stored as the human named it and resolved at diff time, so the review
follows the ref as it moves.
Walkthrough
An agent-published walkthrough: its own comments, its own viewed and seen marks, nothing shared with the working tree, a PR, a commit or a range review.
Implementations§
Source§impl ReviewSource
impl ReviewSource
pub fn commit(oid: impl Into<String>) -> Self
pub fn range(oldest: impl Into<String>, newest: impl Into<String>) -> Self
pub fn pr(number: u64) -> Self
pub fn against(rev: impl Into<String>) -> Self
pub fn walkthrough(id: impl Into<String>) -> Self
Sourcepub fn key(&self) -> String
pub fn key(&self) -> String
Stable persistence key, also the on-disk filename stem. The -
separator is unambiguous because git/jj oids are dash-free hex; every
character is filesystem-safe. A walkthrough id is agent-supplied text,
not an oid, so it goes through the same sanitising a ref name does.
Trait Implementations§
Source§impl Clone for ReviewSource
impl Clone for ReviewSource
Source§fn clone(&self) -> ReviewSource
fn clone(&self) -> ReviewSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReviewSource
impl Debug for ReviewSource
Source§impl<'de> Deserialize<'de> for ReviewSource
impl<'de> Deserialize<'de> for ReviewSource
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 ReviewSource
Source§impl PartialEq for ReviewSource
impl PartialEq for ReviewSource
Source§impl Serialize for ReviewSource
impl Serialize for ReviewSource
impl StructuralPartialEq for ReviewSource
Auto Trait Implementations§
impl Freeze for ReviewSource
impl RefUnwindSafe for ReviewSource
impl Send for ReviewSource
impl Sync for ReviewSource
impl Unpin for ReviewSource
impl UnsafeUnpin for ReviewSource
impl UnwindSafe for ReviewSource
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