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