Struct GitAttributeName
pub struct GitAttributeName(/* private fields */);Expand description
A validated attribute name.
Implementations§
§impl GitAttributeName
impl GitAttributeName
pub fn new(
value: impl AsRef<str>,
) -> Result<GitAttributeName, GitAttributeParseError>
pub fn new( value: impl AsRef<str>, ) -> Result<GitAttributeName, GitAttributeParseError>
Creates an attribute name from text.
§Errors
Returns GitAttributeParseError when the name is empty or invalid.
Trait Implementations§
§impl AsRef<str> for GitAttributeName
impl AsRef<str> for GitAttributeName
§impl Clone for GitAttributeName
impl Clone for GitAttributeName
§fn clone(&self) -> GitAttributeName
fn clone(&self) -> GitAttributeName
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 GitAttributeName
impl Debug for GitAttributeName
§impl Display for GitAttributeName
impl Display for GitAttributeName
§impl FromStr for GitAttributeName
impl FromStr for GitAttributeName
§type Err = GitAttributeParseError
type Err = GitAttributeParseError
The associated error which can be returned from parsing.
§fn from_str(
value: &str,
) -> Result<GitAttributeName, <GitAttributeName as FromStr>::Err>
fn from_str( value: &str, ) -> Result<GitAttributeName, <GitAttributeName as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for GitAttributeName
impl Hash for GitAttributeName
§impl Ord for GitAttributeName
impl Ord for GitAttributeName
§fn cmp(&self, other: &GitAttributeName) -> Ordering
fn cmp(&self, other: &GitAttributeName) -> Ordering
1.21.0 · 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
§impl PartialEq for GitAttributeName
impl PartialEq for GitAttributeName
§impl PartialOrd for GitAttributeName
impl PartialOrd for GitAttributeName
impl Eq for GitAttributeName
impl StructuralPartialEq for GitAttributeName
Auto Trait Implementations§
impl Freeze for GitAttributeName
impl RefUnwindSafe for GitAttributeName
impl Send for GitAttributeName
impl Sync for GitAttributeName
impl Unpin for GitAttributeName
impl UnsafeUnpin for GitAttributeName
impl UnwindSafe for GitAttributeName
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