pub enum ForgeKind {
Github,
Gitlab,
}Expand description
Which forge a request lives on. The flag that names the request names
this too: --pr is GitHub and --mr is GitLab, and nothing infers it.
Variants§
Implementations§
Source§impl ForgeKind
impl ForgeKind
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
The wire name, identical to source.remote.forge in the document.
Sourcepub fn head_ref(self, id: &str) -> String
pub fn head_ref(self, id: &str) -> String
The ref a clone fetches to get a request’s head without the branch.
pub fn source_kind(self) -> SourceKind
Sourcepub fn line_rule(self) -> Option<u32>
pub fn line_rule(self) -> Option<u32>
How far from a change a line comment may sit, or no limit.
GitHub’s public API resolves a line against the request’s diff with
exactly REQUEST_CONTEXT lines around each hunk — measured on a live
request: three after a change lands, four is refused. GitLab positions
a note by its own line numbers against the diff refs and is not held to
that rule here; if it refuses a line, its refusal is what the reader
sees.
Trait Implementations§
impl Copy for ForgeKind
Source§impl<'de> Deserialize<'de> for ForgeKind
impl<'de> Deserialize<'de> for ForgeKind
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 ForgeKind
impl StructuralPartialEq for ForgeKind
Auto Trait Implementations§
impl Freeze for ForgeKind
impl RefUnwindSafe for ForgeKind
impl Send for ForgeKind
impl Sync for ForgeKind
impl Unpin for ForgeKind
impl UnsafeUnpin for ForgeKind
impl UnwindSafe for ForgeKind
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
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
Compare self to
key and return true if they are equal.