pub struct GithubBranchPath<'g> {
pub user: &'g str,
pub repo: &'g str,
pub branch: &'g str,
}Expand description
A GitHub branch URL.
The fields should complete the URL https://github.com/{user}/{repo}/tree/{branch}.
Fields§
§user: &'g strThe GitHub username of the repository owner.
repo: &'g strThe repository name.
branch: &'g strThe branch or SHA1 hash of the commit tree to fetch.
Implementations§
Source§impl<'g> GithubBranchPath<'g>
impl<'g> GithubBranchPath<'g>
Sourcepub fn new(
user: &'g str,
repo: &'g str,
branch: &'g str,
) -> GithubBranchPath<'g>
pub fn new( user: &'g str, repo: &'g str, branch: &'g str, ) -> GithubBranchPath<'g>
Creates a new GithubBranchPath to the given user, repo, and branch.
Sourcepub fn with_branch(&self, branch: &'g str) -> GithubBranchPath<'g>
pub fn with_branch(&self, branch: &'g str) -> GithubBranchPath<'g>
Creates a new GithubBranchPath with the given branch and the same user and repo as this path.
Trait Implementations§
Auto Trait Implementations§
impl<'g> Freeze for GithubBranchPath<'g>
impl<'g> RefUnwindSafe for GithubBranchPath<'g>
impl<'g> Send for GithubBranchPath<'g>
impl<'g> Sync for GithubBranchPath<'g>
impl<'g> Unpin for GithubBranchPath<'g>
impl<'g> UnwindSafe for GithubBranchPath<'g>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more