pub struct GitRemoteName(/* private fields */);Expand description
A validated remote name.
Implementations§
Source§impl GitRemoteName
impl GitRemoteName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, GitRemoteNameError>
pub fn new(value: impl AsRef<str>) -> Result<Self, GitRemoteNameError>
Creates a remote name from text.
§Errors
Returns GitRemoteNameError when the remote name is empty or invalid.
Sourcepub fn is_upstream(&self) -> bool
pub fn is_upstream(&self) -> bool
Returns true when this is upstream.
Trait Implementations§
Source§impl AsRef<str> for GitRemoteName
impl AsRef<str> for GitRemoteName
Source§impl Clone for GitRemoteName
impl Clone for GitRemoteName
Source§fn clone(&self) -> GitRemoteName
fn clone(&self) -> GitRemoteName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GitRemoteName
impl Debug for GitRemoteName
Source§impl Display for GitRemoteName
impl Display for GitRemoteName
Source§impl FromStr for GitRemoteName
impl FromStr for GitRemoteName
Source§impl Hash for GitRemoteName
impl Hash for GitRemoteName
Source§impl Ord for GitRemoteName
impl Ord for GitRemoteName
Source§fn cmp(&self, other: &GitRemoteName) -> Ordering
fn cmp(&self, other: &GitRemoteName) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GitRemoteName
impl PartialEq for GitRemoteName
Source§fn eq(&self, other: &GitRemoteName) -> bool
fn eq(&self, other: &GitRemoteName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for GitRemoteName
impl PartialOrd for GitRemoteName
Source§impl TryFrom<&str> for GitRemoteName
impl TryFrom<&str> for GitRemoteName
impl Eq for GitRemoteName
impl StructuralPartialEq for GitRemoteName
Auto Trait Implementations§
impl Freeze for GitRemoteName
impl RefUnwindSafe for GitRemoteName
impl Send for GitRemoteName
impl Sync for GitRemoteName
impl Unpin for GitRemoteName
impl UnsafeUnpin for GitRemoteName
impl UnwindSafe for GitRemoteName
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