pub struct GitUrl {
pub host: Option<String>,
pub name: String,
pub owner: Option<String>,
pub organization: Option<String>,
pub fullname: String,
pub scheme: Scheme,
pub user: Option<String>,
pub token: Option<String>,
pub port: Option<u16>,
pub path: String,
pub git_suffix: bool,
pub scheme_prefix: bool,
}
Expand description
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§
Trait Implementations§
impl Eq for GitUrl
impl StructuralPartialEq for GitUrl
Auto Trait Implementations§
impl Freeze for GitUrl
impl RefUnwindSafe for GitUrl
impl Send for GitUrl
impl Sync for GitUrl
impl Unpin for GitUrl
impl UnwindSafe for GitUrl
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