#[non_exhaustive]pub enum TrdMarketEnum {
HK,
US,
CN,
HKCC,
Futures,
SG,
AU,
JP,
MY,
CA,
HKFund,
USFund,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
HK
US
CN
HKCC
Futures
SG
AU
JP
MY
CA
HKFund
v1.4.102 fund-market handoff (per pitfall #54): view-only HKFUND/USFUND
融资融券 / 基金账户. C++ NN_TrdMarket_HK_Fund=113,
NN_TrdMarket_US_Fund=123. cash-log backend Market enum 用 13/23,
翻译见 cash_log_market_for_trd_market in cash_log.rs.
USFund
Implementations§
Source§impl TrdMarketEnum
impl TrdMarketEnum
Sourcefn from_proto_variant(p: ProtoTrdMarket) -> Option<Self>
fn from_proto_variant(p: ProtoTrdMarket) -> Option<Self>
v1.4.93 C3 (Option D): map a prost-generated ProtoTrdMarket to our
exposed subset.
proto variants we don’t expose (return None):
Unknown(=0) — invalid placeholderFuturesSimulateHk/Us/Sg/Jp(=10..=13) — separate sim plumbingSgFund/MyFund/JpFund/CaFund— not verified in Rust surface yet
Trait Implementations§
Source§impl Clone for TrdMarketEnum
impl Clone for TrdMarketEnum
Source§fn clone(&self) -> TrdMarketEnum
fn clone(&self) -> TrdMarketEnum
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TrdMarketEnum
impl Debug for TrdMarketEnum
Source§impl From<TrdMarketEnum> for i32
impl From<TrdMarketEnum> for i32
Source§fn from(t: TrdMarketEnum) -> Self
fn from(t: TrdMarketEnum) -> Self
Source§impl JsonSchema for TrdMarketEnum
impl JsonSchema for TrdMarketEnum
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for TrdMarketEnum
impl PartialEq for TrdMarketEnum
Source§impl Serialize for TrdMarketEnum
impl Serialize for TrdMarketEnum
Source§impl ToolEnum for TrdMarketEnum
impl ToolEnum for TrdMarketEnum
Source§fn from_str(s: &str) -> Option<Self>
fn from_str(s: &str) -> Option<Self>
v1.4.93 C3 (Option D): delegate canonical-name lookup to prost-generated
ProtoTrdMarket::from_str_name, then map exposed variants to our local
enum. Hand-written short names ("HK" / "FUTURES" / …) keep working
as a friendly-alias fallback so LLM agents can use either form.
This consolidates the two enum-name lists (proto canonical + tool short)
down to one source of truth (proto). Adding a new proto variant only
requires extending Self::from_proto_variant one arm. Unrecognised
proto variants are intentionally rejected until the corresponding runtime
route has evidence; HK_Fund / US_Fund are the currently exposed fund variants.
Source§fn all_int_values() -> Vec<i32>
fn all_int_values() -> Vec<i32>
Source§fn all_string_values() -> Vec<&'static str>
fn all_string_values() -> Vec<&'static str>
impl Copy for TrdMarketEnum
impl Eq for TrdMarketEnum
impl StructuralPartialEq for TrdMarketEnum
Auto Trait Implementations§
impl Freeze for TrdMarketEnum
impl RefUnwindSafe for TrdMarketEnum
impl Send for TrdMarketEnum
impl Sync for TrdMarketEnum
impl Unpin for TrdMarketEnum
impl UnsafeUnpin for TrdMarketEnum
impl UnwindSafe for TrdMarketEnum
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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>
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>
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