[−][src]Struct git_url_parse::GitUrl
GitUrl represents an input url href
that is a url used by git
Internally during parsing the url is sanitized and uses the url
crate to perform
the majority of the parsing effort, and with some extra handling to expose
metadata used my many git hosting services
Fields
href: String
The input url
host: Option<String>
The fully qualified domain name (FQDN) or IP of the repo
name: String
The name of the repo
owner: Option<String>
The owner/account/project name
organization: Option<String>
The organization name. Supported by Azure DevOps
fullname: String
The full name of the repo, formatted as "owner/name"
protocol: Protocol
The git url protocol
user: Option<String>
The authentication user
token: Option<String>
The oauth token (could appear in the https urls)
port: Option<u16>
The non-conventional port where git service is hosted
path: String
The path to repo w/ respect to user + hostname
git_suffix: bool
Indicate if url uses the .git suffix
Methods
impl GitUrl
[src]
pub fn new(url: &str) -> GitUrl
[src]
Returns a new GitUrl
with provided url
set as href
pub fn parse(url: &str) -> Result<GitUrl>
[src]
Returns a Result<GitUrl>
after normalizing and parsing url
for metadata
Trait Implementations
impl Debug for GitUrl
[src]
impl Default for GitUrl
[src]
impl Display for GitUrl
[src]
impl PartialEq<GitUrl> for GitUrl
[src]
impl StructuralPartialEq for GitUrl
[src]
Auto Trait Implementations
impl RefUnwindSafe for GitUrl
impl Send for GitUrl
impl Sync for GitUrl
impl Unpin for GitUrl
impl UnwindSafe for GitUrl
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,