pub struct GitAttributeRule { /* private fields */ }Expand description
A gitattributes-style rule model.
Implementations§
Source§impl GitAttributeRule
impl GitAttributeRule
Sourcepub fn new<I>(
pattern: impl AsRef<str>,
attributes: I,
) -> Result<GitAttributeRule, GitAttributeParseError>
pub fn new<I>( pattern: impl AsRef<str>, attributes: I, ) -> Result<GitAttributeRule, GitAttributeParseError>
Creates a pattern plus attribute states.
§Errors
Returns GitAttributeParseError::EmptyPattern when the pattern is empty.
Sourcepub fn attributes(&self) -> &[(GitAttributeName, GitAttributeState)]
pub fn attributes(&self) -> &[(GitAttributeName, GitAttributeState)]
Returns the attribute states.
Trait Implementations§
Source§impl Clone for GitAttributeRule
impl Clone for GitAttributeRule
Source§fn clone(&self) -> GitAttributeRule
fn clone(&self) -> GitAttributeRule
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 GitAttributeRule
impl Debug for GitAttributeRule
Source§impl PartialEq for GitAttributeRule
impl PartialEq for GitAttributeRule
Source§fn eq(&self, other: &GitAttributeRule) -> bool
fn eq(&self, other: &GitAttributeRule) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for GitAttributeRule
impl StructuralPartialEq for GitAttributeRule
Auto Trait Implementations§
impl Freeze for GitAttributeRule
impl RefUnwindSafe for GitAttributeRule
impl Send for GitAttributeRule
impl Sync for GitAttributeRule
impl Unpin for GitAttributeRule
impl UnsafeUnpin for GitAttributeRule
impl UnwindSafe for GitAttributeRule
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