Struct GitAttributeRule
pub struct GitAttributeRule { /* private fields */ }Expand description
A gitattributes-style rule model.
Implementations§
§impl GitAttributeRule
impl GitAttributeRule
pub 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.
pub fn attributes(&self) -> &[(GitAttributeName, GitAttributeState)]
pub fn attributes(&self) -> &[(GitAttributeName, GitAttributeState)]
Returns the attribute states.
Trait Implementations§
§impl Clone for GitAttributeRule
impl Clone for GitAttributeRule
§fn clone(&self) -> GitAttributeRule
fn clone(&self) -> GitAttributeRule
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 GitAttributeRule
impl Debug for GitAttributeRule
§impl PartialEq for GitAttributeRule
impl PartialEq for GitAttributeRule
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