pub trait ScreenerFieldExt: ScreenerField + Sized {
// Provided methods
fn gt(self, v: f64) -> QueryCondition<Self> { ... }
fn lt(self, v: f64) -> QueryCondition<Self> { ... }
fn gte(self, v: f64) -> QueryCondition<Self> { ... }
fn lte(self, v: f64) -> QueryCondition<Self> { ... }
fn eq_num(self, v: f64) -> QueryCondition<Self> { ... }
fn between(self, min: f64, max: f64) -> QueryCondition<Self> { ... }
fn eq_str(self, v: impl Into<String>) -> QueryCondition<Self> { ... }
}Expand description
Fluent condition-building methods on any ScreenerField type.
This blanket trait is automatically implemented for all types that implement
ScreenerField, including EquityField and
FundField.
§Example
use finance_query::{EquityField, ScreenerFieldExt};
// Numeric comparisons
let cond = EquityField::PeRatio.between(10.0, 25.0);
let cond = EquityField::AvgDailyVol3M.gt(500_000.0);
let cond = EquityField::EsgScore.gte(50.0);
// String equality
let cond = EquityField::Region.eq_str("us");
let cond = EquityField::Exchange.eq_str("NMS");Provided Methods§
Sourcefn gt(self, v: f64) -> QueryCondition<Self>
fn gt(self, v: f64) -> QueryCondition<Self>
Filter where this field is greater than v.
Sourcefn lt(self, v: f64) -> QueryCondition<Self>
fn lt(self, v: f64) -> QueryCondition<Self>
Filter where this field is less than v.
Sourcefn gte(self, v: f64) -> QueryCondition<Self>
fn gte(self, v: f64) -> QueryCondition<Self>
Filter where this field is greater than or equal to v.
Sourcefn lte(self, v: f64) -> QueryCondition<Self>
fn lte(self, v: f64) -> QueryCondition<Self>
Filter where this field is less than or equal to v.
Sourcefn eq_num(self, v: f64) -> QueryCondition<Self>
fn eq_num(self, v: f64) -> QueryCondition<Self>
Filter where this field equals the numeric value v.
Sourcefn between(self, min: f64, max: f64) -> QueryCondition<Self>
fn between(self, min: f64, max: f64) -> QueryCondition<Self>
Filter where this field is between min and max (inclusive).
Sourcefn eq_str(self, v: impl Into<String>) -> QueryCondition<Self>
fn eq_str(self, v: impl Into<String>) -> QueryCondition<Self>
Filter where this field equals the string value v.
Use for categorical fields like Region, Sector, Industry, Exchange.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<T: ScreenerField + Sized> ScreenerFieldExt for T
Blanket implementation: every ScreenerField automatically gets all the
fluent condition-building methods from ScreenerFieldExt.