pub struct ComponentFilter { /* private fields */ }Implementations§
Source§impl ComponentFilter
impl ComponentFilter
Sourcepub fn MinimumTVL(min_tvl: f64) -> ComponentFilter
👎Deprecated since 0.9.2: Please use with_tvl_range instead
pub fn MinimumTVL(min_tvl: f64) -> ComponentFilter
Creates a ComponentFilter that filters components based on a minimum Total Value Locked
(TVL) threshold.
§Arguments
min_tvl- The minimum TVL required for a component to be tracked. This is denominated in native token of the chain.
Sourcepub fn with_tvl_range(
remove_tvl_threshold: f64,
add_tvl_threshold: f64,
) -> ComponentFilter
pub fn with_tvl_range( remove_tvl_threshold: f64, add_tvl_threshold: f64, ) -> ComponentFilter
Creates a ComponentFilter with a specified TVL range for adding or removing components
from tracking.
Components that drop below the remove_tvl_threshold will be removed from tracking,
while components that exceed the add_tvl_threshold will be added to tracking.
This approach helps to reduce fluctuations caused by components hovering around a single
threshold.
§Arguments
remove_tvl_threshold- The TVL below which a component will be removed from tracking.add_tvl_threshold- The TVL above which a component will be added to tracking.
Note: thresholds are denominated in native token of the chain.
Sourcepub fn Ids(ids: Vec<ComponentId>) -> ComponentFilter
pub fn Ids(ids: Vec<ComponentId>) -> ComponentFilter
Creates a ComponentFilter that includes only the components with the specified IDs,
effectively filtering out all other components.
§Arguments
ids- A vector of component IDs to include in the filter. Only components with these IDs will be tracked.
Trait Implementations§
Source§impl Clone for ComponentFilter
impl Clone for ComponentFilter
Source§fn clone(&self) -> ComponentFilter
fn clone(&self) -> ComponentFilter
Returns a duplicate of the value. Read more
1.0.0§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 ComponentFilter
impl RefUnwindSafe for ComponentFilter
impl Send for ComponentFilter
impl Sync for ComponentFilter
impl Unpin for ComponentFilter
impl UnwindSafe for ComponentFilter
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)