Struct compose_yml::v2::GitUrl [] [src]

pub struct GitUrl { /* fields omitted */ }

URL of a Git repository. Git repositories may be specified as either ordinary http or https URLs, or as scp-style remote directory specifiers.

One of the goals behind this class is to be able to use it as an "enhanced string", much like PathBuf, that can be passed to various APIs using conversion via AsRef and From. So we implement plenty of conversions, plus Ord so we can be used as a key in a BTreeMap.

Methods

impl GitUrl
[src]

[src]

Would docker-compose interpret this string as a URL? We check against a list of known prefixes that trigger URL intepretation in docker-compose.

[src]

Create a GitUrl from the specified string. Will only return an error if should_treat_as_url returns false.

[src]

Convert a GitUrl to a regular url::Url object.

[src]

Returns a new GitUrl which is the same as the this one, but without any subdirectory part

[src]

Extract the repository part of the URL

[src]

Extract the optional branch part of the git URL

[src]

Extract the optional subdirectory part of the git URL

Trait Implementations

impl Debug for GitUrl
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for GitUrl
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for GitUrl
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for GitUrl
[src]

impl PartialOrd for GitUrl
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for GitUrl
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Display for GitUrl
[src]

[src]

Formats the value using the given formatter. Read more

impl AsRef<str> for GitUrl
[src]

[src]

Performs the conversion.

impl AsRef<OsStr> for GitUrl
[src]

Convert to an &OsStr, which makes it easier to use APIs like std::process::Command that take AsRef<OsStr> for their arguments.

[src]

Performs the conversion.

impl From<GitUrl> for String
[src]

[src]

Performs the conversion.

impl From<GitUrl> for OsString
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for GitUrl

impl Sync for GitUrl