pub struct PrRef {
pub url: String,
pub host: String,
pub owner: String,
pub repo: String,
pub number: u64,
}Expand description
A parsed reference to a GitHub pull request. The base repo is recorded
explicitly (owner/repo/host) rather than inferred from a checkout’s
origin, so a PR opened from a fork is still addressed against the repo
where the diff and its review comments live (DESIGN.md §11c).
Fields§
§url: StringCanonical https://{host}/{owner}/{repo}/pull/{number} URL.
host: String§owner: String§repo: String§number: u64Implementations§
Source§impl PrRef
impl PrRef
Sourcepub fn parse(input: &str) -> Result<PrRef>
pub fn parse(input: &str) -> Result<PrRef>
Parse a PR reference from a URL (https://github.com/o/r/pull/12, with
or without scheme, extra path segments, or a query/fragment) or the
owner/repo#number shorthand. Enterprise hosts are preserved. The URL
is re-emitted in canonical form so tracking is idempotent regardless of
which form the operator pasted.
Trait Implementations§
impl Eq for PrRef
impl StructuralPartialEq for PrRef
Auto Trait Implementations§
impl Freeze for PrRef
impl RefUnwindSafe for PrRef
impl Send for PrRef
impl Sync for PrRef
impl Unpin for PrRef
impl UnsafeUnpin for PrRef
impl UnwindSafe for PrRef
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.