pub struct Filters { /* private fields */ }
Expand description
A list of filters.
Aggregates the following:
- a “catch all”
FilterSpec
, the specification for the points that no filter catches; - a “everything”
FilterSpec
, the specification for all the points, regardless of user-defined filters; - a list of
Filter
s; - a memory from allocation UIDs to filter UIDs that tells which filter takes care of some allocation.
The point of the memory is that it is not possible to know which filter takes care of a given allocation after the first time we saw that allocation. Which we want to know when registering the death of an allocation. The reason we don’t know is that new filters might have been introduced or some filters may have changed. Hence the filter assigned for this allocation a while ago may not be the one we would assign now.
Implementations
sourceimpl Filters
impl Filters
sourcepub fn catch_all(&self) -> &FilterSpec
pub fn catch_all(&self) -> &FilterSpec
Specification of the catch_all
filter.
sourcepub fn everything(&self) -> &FilterSpec
pub fn everything(&self) -> &FilterSpec
Specification of the everything
filter.
sourcepub fn filters(&self) -> &Vec<Filter>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn filters(&self) -> &Vec<Filter>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Specifications of the custom filters.
sourcepub fn auto_gen(
data: &Data,
generator: impl Into<FilterGen>
) -> Res<(Self, Vec<Chart>)>
pub fn auto_gen(
data: &Data,
generator: impl Into<FilterGen>
) -> Res<(Self, Vec<Chart>)>
Runs filter generation.
Returns the number of filter generated.
sourcepub fn get_spec_mut(&mut self, uid: Option<Filter>) -> Res<&mut FilterSpec>
pub fn get_spec_mut(&mut self, uid: Option<Filter>) -> Res<&mut FilterSpec>
Filter specification mutable accessor.
sourcepub fn get_mut(&mut self, uid: Filter) -> Res<(usize, &mut Filter)>
pub fn get_mut(&mut self, uid: Filter) -> Res<(usize, &mut Filter)>
Filter mutable accessor.
- returns the index of the filter and the filter itself;
- fails if the filter UID is unknown.
sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Filter>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Filter>
Mutable iterator over the filters.
sourcepub fn find_match(
&mut self,
timestamp: &SinceStart,
alloc: &Alloc
) -> Option<Filter>
pub fn find_match(
&mut self,
timestamp: &SinceStart,
alloc: &Alloc
) -> Option<Filter>
Searches for a filter that matches on the input allocation.
sourcepub fn find_dead_match(&mut self, alloc: &Alloc) -> Option<Filter>
pub fn find_dead_match(&mut self, alloc: &Alloc) -> Option<Filter>
Searches for a filter that matches on the input allocation, for its death.
sourceimpl Filters
impl Filters
sourcepub fn update_all(
&mut self,
everything: FilterSpec,
filters: Vec<Filter>,
catch_all: FilterSpec
) -> Res<Msgs>
pub fn update_all(
&mut self,
everything: FilterSpec,
filters: Vec<Filter>,
catch_all: FilterSpec
) -> Res<Msgs>
Updates all the filters.
sourcepub fn add_new_sub(&mut self, uid: Filter) -> Res<Msgs>
pub fn add_new_sub(&mut self, uid: Filter) -> Res<Msgs>
Adds a new sub-filter.
sourcepub fn filter_stats(&self) -> Res<AllFilterStats>
pub fn filter_stats(&self) -> Res<AllFilterStats>
Extract filter statistics.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Filters
impl Send for Filters
impl Sync for Filters
impl Unpin for Filters
impl UnwindSafe for Filters
Blanket Implementations
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcefn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified method Read more
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford method by default Read more
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
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>
Convert the given value into an approximately equivalent representation.
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ConvUtil for T
impl<T> ConvUtil for T
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
sourceimpl<T, U> IntoColor<U> for T where
U: FromColor<T>,
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
sourcefn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
sourceimpl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
sourcefn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
sourceimpl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
sourcefn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds
error is returned which contains
the unclamped color. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.