Struct hosted_git_info::HostedGitInfo[][src]

pub struct HostedGitInfo { /* fields omitted */ }
Expand description

The parsed information from a git hosting URL.

Implementations

Parses a URL string and returns a HostedGitInfo struct, if successful. If parsing fails, a ParseError will be returned.

The type of hosting provider. (GitHub, Gitlab, Bitbucket, …)

The name of the user or organization on the git host.

This is using an Option because some hosting providers allow projects that are not scoped to a particular user or organization.

Example: https://github.com/Turbo87/hosted-git-info-rs.gitTurbo87

The authentication part of the URL, if it exists.

Format: <USER>[:<PASSWORD>]

Example: https://user:password@github.com/foo/bar.gituser:password

The name of the project on the git host.

Example: https://github.com/Turbo87/hosted-git-info-rs.githosted-git-info-rs

The branch, tag, commit, … part of the URL, if it exists.

Example: https://github.com/Turbo87/hosted-git-info-rs.git#rust-is-awesomerust-is-awesome

The original URL type (shortcut, https, ssh, …).

Example: https://github.com/Turbo87/hosted-git-info-rs.gitHttps

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.