pub struct SetPriceReminderReq {
pub symbol: String,
pub op: i32,
pub key: Option<i64>,
pub reminder_type: Option<i32>,
pub freq: Option<i32>,
pub value: Option<f64>,
pub note: Option<String>,
pub reminder_session_list: Vec<i32>,
}Fields§
§symbol: String§op: i32§key: Option<i64>§reminder_type: Option<i32>§freq: Option<i32>§value: Option<f64>§note: Option<String>§reminder_session_list: Vec<i32>Reminder session list controlling which trading sessions trigger the alert.
Qot_Common::PriceReminderMarketStatus: 1=Open, 2=USPre, 3=USAfter, 4=USOverNight.
US stocks (with pre-/after-/overnight sessions) default to [Open, USPre, USAfter]
when this list is empty. Non-US securities ignore the list entirely.
Implementations§
Source§impl SetPriceReminderReq
impl SetPriceReminderReq
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Runtime validation for op-conditional required fields.
Required fields by op:
- op=1 (Add):
reminder_type+freq+value - op=5 (Modify):
key(other fields are optional and the backend preserves the existing value when omitted) - op=2/3/4 (Del / Enable / Disable):
key - op=6 (DeleteAll): no extra required fields
Returns Err(String) with a human-readable hint for the agent /
SDK user when validation fails.
Trait Implementations§
Source§impl Debug for SetPriceReminderReq
impl Debug for SetPriceReminderReq
Source§impl<'de> Deserialize<'de> for SetPriceReminderReq
impl<'de> Deserialize<'de> for SetPriceReminderReq
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for SetPriceReminderReq
impl JsonSchema for SetPriceReminderReq
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 moreAuto Trait Implementations§
impl Freeze for SetPriceReminderReq
impl RefUnwindSafe for SetPriceReminderReq
impl Send for SetPriceReminderReq
impl Sync for SetPriceReminderReq
impl Unpin for SetPriceReminderReq
impl UnsafeUnpin for SetPriceReminderReq
impl UnwindSafe for SetPriceReminderReq
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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