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