[−][src]Struct git_url_parse::GitUrl
GitUrl represents an input url 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
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"
scheme: Scheme
The git url scheme
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
scheme_prefix: bool
Indicate if url explicitly uses its scheme
Implementations
impl GitUrl
[src]
pub fn trim_auth(&self) -> GitUrl
[src]
Returns GitUrl
after removing user
and token
values
Intended use-case is for non-destructive printing GitUrl excluding any embedded auth info
pub fn parse(url: &str) -> Result<GitUrl>
[src]
Returns a Result<GitUrl>
after normalizing and parsing url
for metadata
Trait Implementations
impl Clone for GitUrl
[src]
impl Debug for GitUrl
[src]
impl Default for GitUrl
[src]
impl Display for GitUrl
[src]
Build the printable GitUrl from its components
impl PartialEq<GitUrl> for GitUrl
[src]
impl StructuralPartialEq for GitUrl
[src]
Auto Trait Implementations
impl RefUnwindSafe for GitUrl
[src]
impl Send for GitUrl
[src]
impl Sync for GitUrl
[src]
impl Unpin for GitUrl
[src]
impl UnwindSafe for GitUrl
[src]
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,