Struct SymbolicRef
pub struct SymbolicRef { /* private fields */ }Expand description
A symbolic ref target.
Implementations§
§impl SymbolicRef
impl SymbolicRef
pub const fn new(target: GitRefName) -> SymbolicRef
pub const fn new(target: GitRefName) -> SymbolicRef
Creates a symbolic ref target from a validated ref name.
pub 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.
pub const fn target(&self) -> &GitRefName
pub const fn target(&self) -> &GitRefName
Returns the target ref name.
Trait Implementations§
§impl Clone for SymbolicRef
impl Clone for SymbolicRef
§fn clone(&self) -> SymbolicRef
fn clone(&self) -> SymbolicRef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for SymbolicRef
impl Debug for SymbolicRef
§impl Display for SymbolicRef
impl Display for SymbolicRef
§impl FromStr for SymbolicRef
impl FromStr for SymbolicRef
§type Err = GitRefParseError
type Err = GitRefParseError
The associated error which can be returned from parsing.
§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 more§impl Hash for SymbolicRef
impl Hash for SymbolicRef
§impl Ord for SymbolicRef
impl Ord for SymbolicRef
§impl PartialEq for SymbolicRef
impl PartialEq for SymbolicRef
§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