pub struct PathPattern {
pub pattern: String,
pub recursive: bool,
}Expand description
Filesystem path pattern
Fields§
§pattern: StringPath pattern (e.g., “./data”, “/tmp”, “~/.config/app”)
recursive: boolAllow recursive access to subdirectories
Implementations§
Source§impl PathPattern
impl PathPattern
Sourcepub fn new(pattern: impl Into<String>) -> PathPattern
pub fn new(pattern: impl Into<String>) -> PathPattern
Create a new path pattern
Sourcepub fn recursive(self) -> PathPattern
pub fn recursive(self) -> PathPattern
Enable recursive access
Sourcepub fn contains(&self, other: &PathPattern) -> bool
pub fn contains(&self, other: &PathPattern) -> bool
Check if this pattern contains/covers another pattern
Trait Implementations§
Source§impl Clone for PathPattern
impl Clone for PathPattern
Source§fn clone(&self) -> PathPattern
fn clone(&self) -> PathPattern
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 moreSource§impl Debug for PathPattern
impl Debug for PathPattern
Source§impl<'de> Deserialize<'de> for PathPattern
impl<'de> Deserialize<'de> for PathPattern
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PathPattern, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PathPattern, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PathPattern
impl PartialEq for PathPattern
Source§impl Serialize for PathPattern
impl Serialize for PathPattern
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for PathPattern
impl StructuralPartialEq for PathPattern
Auto Trait Implementations§
impl Freeze for PathPattern
impl RefUnwindSafe for PathPattern
impl Send for PathPattern
impl Sync for PathPattern
impl Unpin for PathPattern
impl UnwindSafe for PathPattern
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