pub struct Internals {
pub http_client: Option<Client>,
pub describe_cb: Option<Arc<dyn Fn() -> Value + Sync + Send>>,
pub last_rest_ts: i64,
pub headers: IndexMap<String, String>,
pub throttle: ThrottleHandle,
pub implicit_api: IndexMap<String, (String, Vec<String>, String, Value)>,
pub dispatch_stack: Vec<String>,
pub dynamic_dispatch_miss: Option<String>,
}Fields§
§http_client: Option<Client>§describe_cb: Option<Arc<dyn Fn() -> Value + Sync + Send>>§last_rest_ts: i64§headers: IndexMap<String, String>§throttle: ThrottleHandleLeaky-bucket rate-limiter state, (tokens, last_refill_ms), owned by one
task so the &self async throttle() can serialize requests on one
exchange instance without a lock. See ThrottleHandle.
implicit_api: IndexMap<String, (String, Vec<String>, String, Value)>Cached dispatch table built from self.api. Maps the snake-case
implicit API name (e.g. public_get_exchange_info) to
(path, api_scope, http_verb, endpoint_config).
dispatch_stack: Vec<String>Method names currently being dispatched to a derived override. Lets the
async dispatch_to_derived default (in ExchangeBase) block recursion
on a single method while allowing sibling dispatches. This is the only
dispatch state left — virtual dispatch itself is now static (review #1),
so there are no raw self-pointers to keep.
dynamic_dispatch_miss: Option<String>Last snake_case name that reached call_dynamic_base’s _ arm and
matched neither a dispatch arm nor an implicit-API endpoint. That arm
must keep returning Value::Null (a static-request test may probe an
optional name), but a dynamic re-entry from fetchPaginatedCall* /
fetchWebEndpoint treats a miss as fatal — see
crate::exchange::call_dynamic_required.