pub struct PullRequestLink { /* private fields */ }Expand description
A validated pull request identity. It contains no account or credentials.
Implementations§
Source§impl PullRequestLink
impl PullRequestLink
Sourcepub fn parse(url: &str) -> Option<Self>
pub fn parse(url: &str) -> Option<Self>
Accepts only https://github.com/<owner>/<repo>/pull/<number>.
Owner logins use ASCII letters/digits and single internal hyphens;
repository names use ASCII letters/digits, ., _ and -.
Userinfo, ports, suffix paths, queries, fragments and escapes are refused.
Sourcepub fn parse_lenient(url: &str) -> Option<Self>
pub fn parse_lenient(url: &str) -> Option<Self>
Accepts what parse accepts, also with one of the
suffixes GitHub’s own pages add: a query, a fragment (such as
#discussion_r1), /files, /commits or a trailing /. The
identity is the same pull request; callers keep the original URL to
open it as written.
Sourcepub fn from_key(key: &str) -> Option<Self>
pub fn from_key(key: &str) -> Option<Self>
The pull request a qualified owner/repository#number key names, as
key writes it. A key without an owner is refused.
pub fn repo(&self) -> &str
pub fn number(&self) -> u32
pub fn url(&self) -> String
Trait Implementations§
Source§impl Clone for PullRequestLink
impl Clone for PullRequestLink
Source§impl Debug for PullRequestLink
impl Debug for PullRequestLink
impl Eq for PullRequestLink
Source§impl PartialEq for PullRequestLink
impl PartialEq for PullRequestLink
impl StructuralPartialEq for PullRequestLink
Auto Trait Implementations§
impl Forget for PullRequestLink
impl Freeze for PullRequestLink
impl Move for PullRequestLink
impl RefUnwindSafe for PullRequestLink
impl Send for PullRequestLink
impl Sync for PullRequestLink
impl Unpin for PullRequestLink
impl UnsafeUnpin for PullRequestLink
impl UnwindSafe for PullRequestLink
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