pub struct RemoteTrackingBranchName { /* private fields */ }Expand description
A remote-tracking branch spelling such as origin/main.
Implementations§
Source§impl RemoteTrackingBranchName
impl RemoteTrackingBranchName
Sourcepub fn new(
value: impl AsRef<str>,
) -> Result<RemoteTrackingBranchName, GitBranchNameError>
pub fn new( value: impl AsRef<str>, ) -> Result<RemoteTrackingBranchName, GitBranchNameError>
Creates a remote-tracking branch name.
§Errors
Returns GitBranchNameError when the value is invalid or missing parts.
Sourcepub const fn branch(&self) -> &GitBranchName
pub const fn branch(&self) -> &GitBranchName
Returns the branch name portion.
Trait Implementations§
Source§impl Clone for RemoteTrackingBranchName
impl Clone for RemoteTrackingBranchName
Source§fn clone(&self) -> RemoteTrackingBranchName
fn clone(&self) -> RemoteTrackingBranchName
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 RemoteTrackingBranchName
impl Debug for RemoteTrackingBranchName
Source§impl Display for RemoteTrackingBranchName
impl Display for RemoteTrackingBranchName
Source§impl FromStr for RemoteTrackingBranchName
impl FromStr for RemoteTrackingBranchName
Source§type Err = GitBranchNameError
type Err = GitBranchNameError
The associated error which can be returned from parsing.
Source§fn from_str(
value: &str,
) -> Result<RemoteTrackingBranchName, <RemoteTrackingBranchName as FromStr>::Err>
fn from_str( value: &str, ) -> Result<RemoteTrackingBranchName, <RemoteTrackingBranchName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for RemoteTrackingBranchName
impl Hash for RemoteTrackingBranchName
Source§impl Ord for RemoteTrackingBranchName
impl Ord for RemoteTrackingBranchName
Source§fn cmp(&self, other: &RemoteTrackingBranchName) -> Ordering
fn cmp(&self, other: &RemoteTrackingBranchName) -> 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 RemoteTrackingBranchName
impl PartialEq for RemoteTrackingBranchName
Source§fn eq(&self, other: &RemoteTrackingBranchName) -> bool
fn eq(&self, other: &RemoteTrackingBranchName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RemoteTrackingBranchName
impl PartialOrd for RemoteTrackingBranchName
impl Eq for RemoteTrackingBranchName
impl StructuralPartialEq for RemoteTrackingBranchName
Auto Trait Implementations§
impl Freeze for RemoteTrackingBranchName
impl RefUnwindSafe for RemoteTrackingBranchName
impl Send for RemoteTrackingBranchName
impl Sync for RemoteTrackingBranchName
impl Unpin for RemoteTrackingBranchName
impl UnsafeUnpin for RemoteTrackingBranchName
impl UnwindSafe for RemoteTrackingBranchName
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