pub struct Target {
pub kind: TargetKind,
pub id: String,
pub chain: Option<String>,
pub venue: Option<String>,
pub preset: Option<Preset>,
pub health: HealthOverrides,
pub rules: Vec<Rule>,
}Expand description
One thing a watchlist watches.
Fields§
§kind: TargetKind§id: StringA symbol, a contract address or a wallet address.
chain: Option<String>The chain; inferred when absent, as the CLI does.
venue: Option<String>The venue, for market metrics.
preset: Option<Preset>A preset, evaluated before the rules.
health: HealthOverridesHealth threshold overrides for the preset and the market metrics.
rules: Vec<Rule>Implementations§
Source§impl Target
impl Target
Sourcepub fn new(kind: TargetKind, id: impl Into<String>) -> Self
pub fn new(kind: TargetKind, id: impl Into<String>) -> Self
A target with no venue, preset or rules.
Sourcepub fn needs_market(&self) -> bool
pub fn needs_market(&self) -> bool
Whether the target reads a market summary (preset or a market rule).
Sourcepub fn needs(&self, group: MetricGroup) -> bool
pub fn needs(&self, group: MetricGroup) -> bool
Whether any rule reads a metric of group.
Trait Implementations§
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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