Struct git_url::Url[][src]

pub struct Url {
    pub scheme: Scheme,
    pub user: Option<String>,
    pub host: Option<String>,
    pub port: Option<u16>,
    pub path: BString,
}

A URL with support for specialized git related capabilities.

Additionally there is support for deserialization and serialization (see the Display::fmt() implementation).

Fields

scheme: Scheme

The URL scheme.

user: Option<String>

The user to impersonate on the remote.

host: Option<String>

The host to which to connect. Localhost is implied if None.

port: Option<u16>

The port to use when connecting to a host. If None, standard ports depending on scheme will be used.

path: BString

The path portion of the URL, usually the location of the git repository.

Implementations

impl Url[src]

pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>[src]

Parse a URL from bytes

Trait Implementations

impl Clone for Url[src]

impl Debug for Url[src]

impl Default for Url[src]

impl Display for Url[src]

impl Eq for Url[src]

impl Hash for Url[src]

impl Ord for Url[src]

impl PartialEq<Url> for Url[src]

impl PartialOrd<Url> for Url[src]

impl StructuralEq for Url[src]

impl StructuralPartialEq for Url[src]

impl TryFrom<&'_ [u8]> for Url[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<Cow<'a, [u8]>> for Url[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Url

impl Send for Url

impl Sync for Url

impl Unpin for Url

impl UnwindSafe for Url

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.