pub enum Condition {
Show 16 variants
Gt((Operand, Operand)),
Lt((Operand, Operand)),
Ge((Operand, Operand)),
Le((Operand, Operand)),
Eq((Operand, Operand)),
Ne((Operand, Operand)),
CrossAbove((Operand, Operand)),
CrossBelow((Operand, Operand)),
Between((Operand, Operand, Operand)),
Rising((Operand, u32)),
Falling((Operand, u32)),
All(Vec<Condition>),
Any(Vec<Condition>),
Not(Box<Condition>),
InPosition(bool),
BarsSinceEntry(IntPredicate),
}Expand description
A boolean node — evaluates to true/false each bar.
Variants§
Gt((Operand, Operand))
a > b.
Lt((Operand, Operand))
a < b.
Ge((Operand, Operand))
a >= b.
Le((Operand, Operand))
a <= b.
Eq((Operand, Operand))
a == b.
Ne((Operand, Operand))
a != b.
CrossAbove((Operand, Operand))
a crosses above b this bar.
CrossBelow((Operand, Operand))
a crosses below b this bar.
Between((Operand, Operand, Operand))
lo <= a <= hi: [a, lo, hi].
Rising((Operand, u32))
a is greater than its value n bars ago: [a, n].
Falling((Operand, u32))
a is less than its value n bars ago: [a, n].
All(Vec<Condition>)
All sub-conditions true (AND).
Any(Vec<Condition>)
Any sub-condition true (OR).
Not(Box<Condition>)
Negation.
InPosition(bool)
True iff a position is currently open.
BarsSinceEntry(IntPredicate)
Predicate on the number of bars since entry.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Condition
impl<'de> Deserialize<'de> for Condition
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Condition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Condition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Condition
impl JsonSchema for Condition
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for Condition
impl Serialize for Condition
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more