pub struct Url {
pub scheme: Scheme,
pub user: Option<String>,
pub host: Option<String>,
pub port: Option<u16>,
pub path: BString,
}
Expand description
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
Trait Implementations
sourceimpl Ord for Url
impl Ord for Url
sourceimpl PartialOrd<Url> for Url
impl PartialOrd<Url> for Url
sourcefn partial_cmp(&self, other: &Url) -> Option<Ordering>
fn partial_cmp(&self, other: &Url) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Url
impl StructuralEq for Url
impl StructuralPartialEq for Url
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more