pub struct GitAttributeName(/* private fields */);Expand description
A validated attribute name.
Implementations§
Source§impl GitAttributeName
impl GitAttributeName
Sourcepub 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§
Source§impl AsRef<str> for GitAttributeName
impl AsRef<str> for GitAttributeName
Source§impl Clone for GitAttributeName
impl Clone for GitAttributeName
Source§fn clone(&self) -> GitAttributeName
fn clone(&self) -> GitAttributeName
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 GitAttributeName
impl Debug for GitAttributeName
Source§impl Display for GitAttributeName
impl Display for GitAttributeName
Source§impl FromStr for GitAttributeName
impl FromStr for GitAttributeName
Source§type Err = GitAttributeParseError
type Err = GitAttributeParseError
The associated error which can be returned from parsing.
Source§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 moreSource§impl Hash for GitAttributeName
impl Hash for GitAttributeName
Source§impl Ord for GitAttributeName
impl Ord for GitAttributeName
Source§fn cmp(&self, other: &GitAttributeName) -> Ordering
fn cmp(&self, other: &GitAttributeName) -> 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 GitAttributeName
impl PartialEq for GitAttributeName
Source§fn eq(&self, other: &GitAttributeName) -> bool
fn eq(&self, other: &GitAttributeName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§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