Struct diagnostic_quick::error_3rd::GlobSet
source · pub struct GlobSet { /* private fields */ }Expand description
GlobSet represents a group of globs that can be matched together in a single pass.
Implementations§
source§impl GlobSet
impl GlobSet
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if this set is empty, and therefore matches nothing.
sourcepub fn is_match<P>(&self, path: P) -> boolwhere
P: AsRef<Path>,
pub fn is_match<P>(&self, path: P) -> boolwhere
P: AsRef<Path>,
Returns true if any glob in this set matches the path given.
sourcepub fn is_match_candidate(&self, path: &Candidate<'_>) -> bool
pub fn is_match_candidate(&self, path: &Candidate<'_>) -> bool
Returns true if any glob in this set matches the path given.
This takes a Candidate as input, which can be used to amortize the cost of preparing a path for matching.
sourcepub fn matches<P>(&self, path: P) -> Vec<usize, Global> ⓘwhere
P: AsRef<Path>,
pub fn matches<P>(&self, path: P) -> Vec<usize, Global> ⓘwhere
P: AsRef<Path>,
Returns the sequence number of every glob pattern that matches the given path.
sourcepub fn matches_candidate(&self, path: &Candidate<'_>) -> Vec<usize, Global> ⓘ
pub fn matches_candidate(&self, path: &Candidate<'_>) -> Vec<usize, Global> ⓘ
Returns the sequence number of every glob pattern that matches the given path.
This takes a Candidate as input, which can be used to amortize the cost of preparing a path for matching.
sourcepub fn matches_into<P>(&self, path: P, into: &mut Vec<usize, Global>)where
P: AsRef<Path>,
pub fn matches_into<P>(&self, path: P, into: &mut Vec<usize, Global>)where
P: AsRef<Path>,
Adds the sequence number of every glob pattern that matches the given path to the vec given.
into is cleared before matching begins, and contains the set of
sequence numbers (in ascending order) after matching ends. If no globs
were matched, then into will be empty.
sourcepub fn matches_candidate_into(
&self,
path: &Candidate<'_>,
into: &mut Vec<usize, Global>
)
pub fn matches_candidate_into(
&self,
path: &Candidate<'_>,
into: &mut Vec<usize, Global>
)
Adds the sequence number of every glob pattern that matches the given path to the vec given.
into is cleared before matching begins, and contains the set of
sequence numbers (in ascending order) after matching ends. If no globs
were matched, then into will be empty.
This takes a Candidate as input, which can be used to amortize the cost of preparing a path for matching.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for GlobSet
impl Send for GlobSet
impl Sync for GlobSet
impl Unpin for GlobSet
impl UnwindSafe for GlobSet
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<T> SetParameter for T
impl<T> SetParameter for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.