pub struct NonConePatterns { /* private fields */ }Expand description
Parsed non-cone sparse-checkout patterns in file order (last match wins).
Implementations§
Source§impl NonConePatterns
impl NonConePatterns
Sourcepub fn from_lines(lines: Vec<String>) -> Self
pub fn from_lines(lines: Vec<String>) -> Self
Build from already-trimmed pattern lines (non-cone mode).
Sourcepub fn lines(&self) -> &[String]
pub fn lines(&self) -> &[String]
Sparse-checkout pattern lines in file order (for Git-style inclusion checks).
Sourcepub fn parse(content: &str) -> Self
pub fn parse(content: &str) -> Self
Parse a sparse-checkout file into ordered patterns (non-cone mode).
Sourcepub fn path_included(&self, path: &str) -> bool
pub fn path_included(&self, path: &str) -> bool
Returns true if path is included after applying ordered negated patterns.
Trait Implementations§
Source§impl Clone for NonConePatterns
impl Clone for NonConePatterns
Source§fn clone(&self) -> NonConePatterns
fn clone(&self) -> NonConePatterns
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 moreAuto Trait Implementations§
impl Freeze for NonConePatterns
impl RefUnwindSafe for NonConePatterns
impl Send for NonConePatterns
impl Sync for NonConePatterns
impl Unpin for NonConePatterns
impl UnsafeUnpin for NonConePatterns
impl UnwindSafe for NonConePatterns
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