pub struct ReviewSource {
pub base: String,
pub head: String,
pub kind: SourceKind,
pub head_spec: String,
pub identity_base: Option<String>,
pub remote: Option<Remote>,
}Expand description
A resolved review source: where the diff comes from, and what the review is filed under.
base/head are the diff’s endpoints. head_spec and identity_base are
its identity — deliberately separate, because reviewing uncommitted work
diffs against synthesized trees that churn on every edit while the review
itself must survive (ADR 0017).
Fields§
§base: String§head: String§kind: SourceKind§head_spec: StringThe head endpoint as typed.
identity_base: Option<String>The base a review is filed under when it differs from base — set for
uncommitted sources, whose base/head may be synthesized tree oids.
remote: Option<Remote>The request this range came from, when the reader named one
(ADR 0029). Written to source.remote; nothing else reads it.
Implementations§
Source§impl ReviewSource
impl ReviewSource
Sourcepub fn request(
base: String,
head: String,
kind: SourceKind,
remote: Remote,
) -> Self
pub fn request( base: String, head: String, kind: SourceKind, remote: Remote, ) -> Self
A pull request or merge request: the endpoints the forge gave, and the
request recorded as the document’s source.remote. The review’s
identity is the request itself, not these endpoints, so head_spec
is the head sha and no identity_base is set.
Trait Implementations§
Source§impl Clone for ReviewSource
impl Clone for ReviewSource
Source§impl Debug for ReviewSource
impl Debug for ReviewSource
impl Eq for ReviewSource
Source§impl PartialEq for ReviewSource
impl PartialEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.