pub enum Link {
Closes(u64),
Refs(u64),
}Expand description
The link line of a pull request.
Variants§
Closes(u64)
Closes #N: the last pull request of issue N. Its merge closes
the issue.
Refs(u64)
Refs #N: each other pull request of issue N.
Implementations§
Source§impl Link
impl Link
Sourcepub fn parse(line: &str) -> Option<Self>
pub fn parse(line: &str) -> Option<Self>
The link of one line: Closes #N or Refs #N, and nothing else.
use hygiene::Link;
assert_eq!(Link::parse("Closes #12"), Some(Link::Closes(12)));
assert_eq!(Link::parse(" Refs #7 "), Some(Link::Refs(7)));
assert_eq!(Link::parse("closes #12"), None, "a keyword, not a link line");
assert_eq!(Link::parse("Closes #12 and #13"), None);Trait Implementations§
impl Copy for Link
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin for Link
impl UnwindSafe for Link
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