Skip to main content

UiShared

Struct UiShared 

Source
pub struct UiShared { /* private fields */ }
Expand description

插件面板与宿主观察线程共用的观测状态。

Implementations§

Source§

impl UiShared

Source

pub fn new() -> Self

空状态(快照空、日志空、rev 0)。

Source

pub fn update_tick(&self, t: &TickData)

落一条 tick(eTick. 裸键上屏;逐 symbol 覆盖)。

Source

pub fn tick_rows(&self) -> Vec<TickData>

tick 只读视图(排序后)。

Source

pub fn tick_groups(&self) -> Vec<(String, Vec<TickData>)>

tick 按交易所分组(行情 tab 二级 tab 键表)。

Source

pub fn tick_count(&self) -> usize

tick 库格数。

Source

pub fn order_form(&self) -> OrderForm

下单表单只读快照。

Source

pub fn set_order_form(&self, f: OrderForm)

下单表单写(渲染侧每控件改动即写)。

Source

pub fn selected_exchange(&self) -> String

选中交易所(行情带当前 tab;不在六所内的取值由本口夹回首所 —— 空/脏值 都落到 SHFE,调用方永远拿到一个可用的 tab 名;行情行单击只带入下单面板, tab 归 tab 条管)。

Source

pub fn set_selected_exchange(&self, s: impl Into<String>)

选中交易所写。

Source

pub fn topleft_tab(&self) -> TopLeftTab

左上组当前 tab。

Source

pub fn set_topleft_tab(&self, t: TopLeftTab)

左上组 tab 写。

Source

pub fn bottomright_tab(&self) -> BottomRightTab

右下组当前 tab。

Source

pub fn set_bottomright_tab(&self, t: BottomRightTab)

右下组 tab 写。

Source

pub fn data_split(&self) -> DataSplit

数据区分刀份额读(渲染期)。

Source

pub fn set_data_split(&self, s: DataSplit)

数据区分刀份额写(分隔条拖拽回调;写入前就地夹取到可用区,QSplitter minimumSize 语义 —— 调用方传多少都不出界)。

Source

pub fn reset_layout(&self)

「恢复布局」:数据区分刀回 Python right_splitter 口径(两刀各半), 三个 tab 态回缺省。dock 时代的「整树替换」不再存在 —— 布局骨架本来就是 Python 等价的原生面板,没有树可换。

Source

pub fn ops_window_open(&self) -> bool

运维窗开合。

Source

pub fn table_sort(&self, table: &str) -> Option<(usize, bool)>

运维窗开合写。 某张表当前的排序键(None = 按数据源原序)。

Source

pub fn toggle_table_sort(&self, table: &str, col: usize)

表头点击:同列再点 = 翻向;异列 = 新列升序(与 Python QTableView 单击表头同口径)。

Source

pub fn set_ops_window_open(&self, v: bool)

Source

pub fn accounts_window_open(&self) -> bool

账户面板开合。

Source

pub fn set_accounts_window_open(&self, v: bool)

账户面板开合写。

Source

pub fn account_edit_open(&self) -> bool

账户配置弹窗开合(0.2.18 Commit B)。

Source

pub fn editing_account(&self) -> Option<String>

当前弹窗模式:Some(派生名) = 编辑;None = 添加。

Source

pub fn begin_account_edit(&self, gateway: Option<&str>) -> bool

打开配置弹窗并载入草稿:Some(派生名) = 编辑模式(草稿 = 该账户留档); None = 添加模式(草稿 = draft_from_existing(),凭据位空)。 账户不在清册 = false(不开一个编辑不存在账户的窗)。

Source

pub fn end_account_edit(&self)

关闭配置弹窗 = 放弃未保存(规划 Q24:绝不静默写入清册留档)。

Source

pub fn end_account_edit_if_editing(&self, gateway: &str)

摘除一行账户时的连带口径:若这行正被配置弹窗编辑,立即关弹窗放弃。

不这么做的话:弹窗是非 modal 的,用户可以在弹窗开着时点同一行的『移除』—— 编辑目标消失后弹窗会静默退化成「添加模式」(只读句消失、字段全部可编辑), 此时点『保存』会拿旧凭据建出一个新账户。这是执行核查抓到的坑。

Source

pub fn edit_alias(&self) -> String

弹窗别名草稿读。

Source

pub fn set_edit_alias(&self, v: impl Into<String>)

弹窗别名草稿写。

Source

pub fn edit_error(&self) -> Option<String>

弹窗拦截原因读(None = 无)。

Source

pub fn set_edit_error(&self, e: Option<String>)

弹窗拦截原因写(None = 清)。

Source

pub fn account_edit_dirty(&self) -> bool

弹窗草稿与该账户留档是否不一致(dirty;添加模式恒为“有内容待保存“)。

Source

pub fn accounts(&self) -> Vec<AccountRow>

账户清单只读视图(注册序)。

Source

pub fn account(&self, gateway: &str) -> Option<AccountRow>

单行账户查询。

Source

pub fn add_account(&self, row: AccountRow) -> Result<(), String>

新增一行账户(只写清册,不装配 —— 规划裁定「添加 ≠ 连接」)。

Err(原因) 三种:派生名已存在(同 broker+账号重复添加)、别名重名(规划 Q3)、 达账户软上限 MAX_ACCOUNTS。宿主侧还有第二道 Duplicate 守卫;界面侧先拦是为了 不建出一个“注定被拒“的请求。

Source

pub fn can_add_account(&self) -> bool

是否还能添加账户。

Source

pub fn set_account_alias(&self, gateway: &str, alias: &str) -> bool

改一行账户的别名(按 gateway 主键;不存在 = false)。

别名只用于显示与选择,不参与寻址(寻址恒用派生注册名,规划 Q3)。 别名须唯一(与 add_account 同一守卫):空别名 = 不设别名(合法); 与他人重名 = false(调用方须显形,不得静默改成重名别名)。

Source

pub fn note_connect_sent(&self, gateway: &str)

UiCmd::Connect 已入列 → 四态置「装配中」并清掉上一次的失败原因。

登录态一并退回 Unknown(0.2.19):新一轮装配开始时,上一轮的「在线/掉线」 不再是这一轮的事实 —— 留着会让用户在重连过程中看到「在线」。

Source

pub fn note_connect_result(&self, gateway: &str, result: Result<(), String>)

装配结果回写:Ok(()) → 「实例已装配」;Err(原因) → 「装配失败」+ 原因留显形。

失败不回滚清册行(规划 U3 定盘:行留着,给『重试』;旧口径“必须先移除才能重试“作废)。

Source

pub fn note_effective_product_classes(&self, gateway: &str, classes: &[String])

记录网关实际收录的产品类(ConfigureReply.product_classes 回带,规划 U9)。

只存不改用户勾选:勾选是意图,这一栏是事实,两者并排显示。

Source

pub fn note_chain(&self, gateway: &str, note: &str)

链状态行落账(0.5.0,用户定):note = [链] 前缀之后的正文,账户表「阶段」列显示它。

只认 ek-ctp 推的状态行(调用点在 plugin.rs 的 eLog 分支按前缀筛),普通日志不动这一栏。 没有对应账户行 = 什么都不做(网关还没进清册,状态行先到是正常时序)。

Source

pub fn status_thresholds(&self) -> (u32, i64)

当前生效的「查询断供」阈值:(连续被拒次数, 资金回报超时秒)。

Source

pub fn set_status_thresholds(&self, reject_limit: u32, stale_secs: i64)

覆盖阈值(测试夹具把两判据收紧到「1 次 / 0 秒」,才好在没有真柜台的用例里显形)。

Source

pub fn list_poll_due(&self) -> bool

管制面快照的轮询节拍:eTimer 每拍调一次。

三个条件任一为真就问:① 被标记(插件上/下线、svctl 起停);② 第一拍(界面刚 起来不该空着等 4 秒);③ 每 LIST_POLL_TICKS 拍一次。

Source

pub fn request_list_refresh(&self)

置「下一拍就重问管制面」(插件上下线、svctl 起停回执之后)。

Source

pub fn request_trade_reseed(&self)

置「重播种一次四张表」(网关或 oms 上线之后)。消费方 = 命令线程。

Source

pub fn take_trade_reseed(&self) -> bool

取走「重播种」标记(消费性,不是一档状态)。

Source

pub fn status_batch(&self, present: &[String]) -> Vec<String>

这一拍该问哪几个账户的 {gw}.status(0.5 M3 摊平)。

入参 = 当前「已装配且在场」的网关名;返回不超过 STATUS_ASKS_PER_TICK 个, 从游标起环形取 —— 8 个账户 4 拍走完一轮,单拍 ask 上限恒定。

Source

pub fn request_pipeline_refresh(&self)

置「该问一次 oms 装配」(0.5 M3:事件触发而不是节拍)。

Source

pub fn take_pipeline_due(&self) -> bool

消费「该问一次 oms 装配」标记(取一次即清)。

Source

pub fn request_cfg_refresh(&self)

置「该问一次段落目录」(0.6.0 环节8;运维窗钮)。

Source

pub fn take_cfg_due(&self) -> bool

消费「该问一次段落目录」标记(取一次即清)。

Source

pub fn set_cfg_briefs(&self, b: Vec<NsBrief>)

段落目录回写(0.6.0)。

Source

pub fn cfg_briefs(&self) -> Option<Vec<NsBrief>>

段落目录只读视图(0.6.0;None = 从未问过)。

Source

pub fn cfg_delete_armed(&self) -> Option<String>

清段二次确认臂(0.6.0;Some(ns) = 已点过一次,下一帧再点同一行才真发)。

Source

pub fn arm_cfg_delete(&self, ns: Option<String>)

Source

pub fn set_pipeline_lines(&self, lines: Vec<String>)

oms.pipeline_status 读数回写(装配事实,不是业务事实)。

Source

pub fn pipeline_lines(&self) -> Vec<String>

最新一次的 oms 装配显形读数(空 = 运维窗不画这一节)。

Source

pub fn note_bad_payload(&self, line: &str)

某条推送线的载荷类型不对(0.5 M1)。

链上这几条线的载荷类型不是编译期保证:ePosition. 的载荷「由广发方确定」 (ek-oms plugin.rs:329 同样只能 downcast 试)。收不进去就计数,并在第一次 显形一条日志 —— 静默丢等于「界面少了一路数据而没人知道」。

Source

pub fn bad_payload_count(&self, line: &str) -> u64

某条推送线累计收不进去多少条(测试判据)。

Source

pub fn note_plugin_spill(&self, rows: &[PlugRow])

插件邮箱溢出的显形(0.4.5,P7d;0.5 M6 把容量判据改成逐行各自的容量)。

PlugRow.spilled 是 ek-core 的累计计数(EntryStats.spilled),运维窗那一列 一直有,但当场不响:ek-core 的 stderr 诊断每 128 条才打一条 (SPILL_REPORT_EVERY)。这一条把它变成屏上的一次 toast。 去重口径与 BD-UI-50 同(告警是状态口问出来的事实,不是渲染帧的副作用): 每个插件第一次溢出弹一次;跨过该插件自己的邮箱容量再弹一次(持续溢出不刷屏, 但「溢满一整轮」是另一件事 —— 那时丢的已经不是零星几条而是一段时间的行情)。

Source

pub fn note_gateway_status(&self, gateway: &str, st: &GatewayStatus)

{gw}.status 读数回写 → 该行登录态与细节重算。

0.3.2(Wave E,BD-UI-50)这里同时是告警的唯一产生口:轮询一拍问出告警态就灌 toast。 为什么住这儿而不是账户面板的渲染里(Python AlertEngine 的对照口径): 告警是「状态口问出来的事实」,不是「某张窗画出来的东西」——账户窗没开也必须知道掉线了。 去重键 = 网关 + 登录态:同一状态只弹一次,状态变了才算新告警(否则每轮轮询一条, 8 秒自动关与同屏上限 3 都没有意义)。

Source

pub fn note_status_unreachable(&self, gateway: &str, why: &str)

状态口问不到(网关不在场 / ask 超时):登录态退回 Unknown 并写明原因。

不得保留上一轮的「在线」:问不到就是没有证据,留着旧读数等于替网关谎称在线。

Source

pub fn mark_account_stopped(&self, gateway: &str)

『断开』已发令 → 该行立刻显形「已断开」(不等下一轮轮询;用户按了就该马上看到)。

Source

pub fn prepare_connect_form(&self, gateway: &str, form: CtpForm) -> CtpForm

装配前把表单落到该账户留档,并按全局单源纪律裁决 md 位: 非行情源账户 → md_addr 就地清空(留档与下发同一份,消 U4 的“只清下发不清留档“)。

Source

pub fn draft_from_existing(&self) -> CtpForm

『添加账户』弹窗的草稿位:沿用当前在场账户的非凭据字段 (broker / AppID / AuthCode / 收录勾选),凭据位(账号、密码、前置)一律清空 (规划 Q20 的零风险缓解:少敲几遍,但绝不把上一家的密码带进下一家)。

Source

pub fn update_account_form(&self, gateway: &str, form: CtpForm) -> bool

更新一行账户的表单留档(按 gateway 主键;不存在 = false)。

Source

pub fn remove_account(&self, gateway: &str) -> bool

摘除一行账户(界面侧清册;网关实例由 UiCmd::Remove 走 svctl 摘)。

Source

pub fn sync_accounts_connected(&self, rows: &[PlugRow]) -> Vec<String>

用 svctl 快照回填账户在场位与四态;回带本轮新装配的网关名(订阅重放用)。

四态口径:svctl 带回这个名字 = 实例已装配(清掉失败原因); 名字不在场且原先记着「已装配」= 回到「未装配」(被摘/宿主崩了); 「装配中」与「装配失败」是界面侧记的,不被在场表覆盖。

0.2.19 附带一条:实例不在场时登录态读数一并作废 —— 会话读数属于那个实例, 实例没了还留着「在线/掉线 2 次」,就是在替一个不存在的会话说话。

Source

pub fn md_source(&self) -> String

行情元账号注册名(空 = 未选)。

Source

pub fn accounts_locked(&self) -> bool

是否已有账户装配 —— 元账号锁定判定(规划 D3:连接后不允许切换)。

Source

pub fn set_md_source(&self, gateway: &str) -> Result<(), String>

指定行情元账号(仅配置阶段;任何账户已连接 = 拒,界面须提示“先断开“)。

Source

pub fn subscriptions(&self) -> Vec<String>

订阅集只读视图。

Source

pub fn note_subscriptions(&self, symbols: &[String])

登记订阅(去重保序;断开重连后按它重放)。

Source

pub fn default_gateway(&self) -> Option<String>

下单默认账户阶梯(替代旧“空 → 字面量 ctp“兜底,规划 §5.B; 0.2.18 四态后修正,规划 Q4): 上次手动选择(须仍在清册且已装配)→ 第一个已装配账户; 未装配账户不得进默认 —— 旧阶梯的“退到第一个账户“会把只添加了还没连接的 账户选成下单归属,发出去只会撞 unknown:gateway。 一个都没有 = None(界面据此禁用下单钮)。

Source

pub fn kline_symbols(&self) -> Vec<String>

已开 K线窗合约表(多开,去重)。

Source

pub fn open_kline(&self, symbol: impl Into<String>)

开 K线窗(去重;日志留痕可断言)。

Source

pub fn close_kline(&self, symbol: &str)

关 K线窗(窗关闭钮 → 出表)。

Source

pub fn contracts_window_open(&self) -> bool

查询合约窗开合。

Source

pub fn set_contracts_window_open(&self, v: bool)

查询合约窗开合写。

Source

pub fn update_contract(&self, c: &ContractData)

落一条合约(eContract. 裸键上屏)。

Source

pub fn contracts(&self, pattern: &str) -> Vec<ContractData>

合约查询(Python ContractManager 口径:留空 = 全部)。

Source

pub fn contract_count(&self) -> usize

合约库格数。

Source

pub fn contract_query(&self) -> String

查询串读写。

Source

pub fn set_contract_query(&self, q: impl Into<String>)

查询串写。

Source

pub fn toggle_contract_selection(&self, en_symbol: &str)

勾选翻转(en_symbol)。

Source

pub fn selected_contracts(&self) -> Vec<String>

当前勾选集。

Source

pub fn log_line(&self, line: impl Into<String>)

追加一行日志(总线面/宿主观察线程写)。

Source

pub fn clear_logs(&self)

清空日志(渲染“清空日志“按钮 / 测试)。

Source

pub fn logs_snapshot(&self) -> (Vec<String>, u64)

日志只读快照 + 溢出计数。

Source

pub fn logs_entries(&self) -> (Vec<LogEntry>, u64)

带时间戳的日志快照(BD-UI-41 渲染侧:日志表格的「时间」列)。

Source

pub fn logs_len(&self) -> usize

日志当前长度(kittest 断言用)。

Source

pub fn set_snapshot(&self, snap: BusSnap)

落一次服务快照(eTimer 节流回调)。

Source

pub fn snapshot(&self) -> Arc<BusSnap> ⓘ

当前快照(Arc 克隆,零拷贝走锁)。

Source

pub fn rev(&self) -> u64

revision:任何写入 +1(插件面 ePlug 事件也用;测试判定“有事件进来过“)。

Source

pub fn bump(&self)

手动推一次 revision(总线面 ePlugUp/Down 记账用)。

Source

pub fn request_stop(&self)

置关窗信号(eframe App 关窗钩子调用)。

Source

pub fn push_alert(&self, level: AlertLevel, text: impl Into<String>)

观察线程轮询用。 0.3.2(Wave E,BD-UI-50)告警入口:界面层调它,渲染帧灌进 toast 队列。

Source

pub fn alert_once(&self, key: impl Into<String>) -> bool

去重:这条告警第一次出现返回 true(同一键不再重复弹)。

Source

pub fn pending_alert_count(&self) -> usize

待灌进 toast 的告警条数(状态层判据用;灌进队列由渲染帧收口)。

Source

pub fn alerted_count(&self) -> usize

已弹过的告警键数(去重账本;判据用它核「同一状态不重复弹」)。

Source

pub fn exit_confirm_open(&self) -> bool

退出确认窗:开 / 关 / 是否已确认放行(0.3.1 BD-UI-49)。

Source

pub fn open_exit_confirm(&self)

Source

pub fn close_exit_confirm(&self)

Source

pub fn exit_confirmed(&self) -> bool

Source

pub fn confirm_exit(&self)

Source

pub fn is_stop(&self) -> bool

Source

pub fn push_cmd(&self, cmd: UiCmd)

入一条操作指令(窗口面离场动作唯一通道;左位不直调)。

Source

pub fn drain_cmds(&self) -> Vec<UiCmd>

取走全部指令(0.5 M5:命令线程辞行)。

Source

pub fn cmd_pending(&self) -> bool

队列里是否有待执行指令(命令线程的「有没有活」判据,不消费)。

Source

pub fn pending_confirm(&self) -> Option<String>

当前待二次确认目标(Some = 二次确认中)。

Source

pub fn confirm_step(&self, name: &str) -> ConfirmStep

确认步进:同名二点 = 发令(Fired),异名 = 迁移(Switched),首点 = 进入待确认。

Source

pub fn confirm_cancel(&self)

清除待确认(取消钮)。

Source

pub fn market(&self) -> &MarketStore

行情库直读(读写两用:worker 写,渲染读)。

Source

pub fn seed_trade_snap(&self, ts: TradeSnap)

全量播种四本账(测试夹具的入口;0.5 起生产侧不再走这一条 —— 启动一次四问 走 note_* 合并式播种,见 plugin.rs::reconcile_trade)。

与 note_* 的分工:这一条是「把已有的一份账交给界面」(先清后灌),note_* 是 「一批新事件进来」。行序按入参反序赋 seq,正是为了让重建后的 trade_snap() 与喂进来的顺序一致 —— 播种不是「一批新事件」,只有新事件才走「在前」。

Source

pub fn note_order(&self, o: &OrderData)

一笔委托入账(基线 OrderMonitor:有 en_orderid 就更新可变列,否则新行)。

可变列口径照基线 widget.py:1341-1357 的 update 标记:随回报走的是 name / traded / traded_price / status / status_msg / datetime;symbol / exchange / type / direction / offset / price / volume / orderid / reference / gateway_name 插入后不再被后续回报改写 —— CTP 的后续回报里这些字段可能给空, 整行覆盖会把「总量」写成 0(BaseCell.set_content 的 if self.is_update 挡的就是这个)。

Source

pub fn note_trade(&self, t: &TradeData)

一笔成交入账(0.5 裁定:按 en_tradeid 去重,新成交在前)。

基线的两层口径在这里合成一条:表格层 TradeMonitor.data_key = ""(:1267,只插不改、 不按键更新),引擎层 trades_filter_dict(engine.py:1072-1080,同一笔成交只算一次, 注释写明防的是账户重连时柜台重推)。我们的成交表就是用户看到的那本账,而它现在有两个 事件源(网关推送 + 启动 / 上线播种),所以引擎层那一条必须落到这里,否则同一笔会出两行 —— 实连演示里量出来了:摘账户再重加之后,元账号 3 行成交变 4 行、纯 TD 账号 3 行变 6 行。

Source

pub fn note_position(&self, p: &PositionData)

一笔持仓入账(基线 PositionMonitor:键 en_positionid,可变列照 :1480-1497)。

「平仓后残留」由渲染侧处理(基线 :1514-1517 的 volume == 0 → hideRow): 账本留着这一行、把 volume 写成 0,不删行。

Source

pub fn note_funds(&self, a: &AccountData)

一笔资金入账(基线 AccountMonitor:键 en_accountid,可变列 balance / frozen)。

Source

pub fn clear_gateway_rows(&self, gateway: &str) -> usize

某网关的行全部作废(0.5 M1:摘除 / 下线后不留旧委托旧仓)。返回清掉的行数。

Source

pub fn trade_dropped(&self) -> u64

成交账本触顶丢弃计数(0.5 偏离③;0 = 从没丢过)。

Source

pub fn trade_snap(&self) -> Arc<TradeSnap> ⓘ

交易监控快照读(渲染):四本账的缓存视图,脏时按帧重建一次。

脏标记由入账置真、这里消费 —— 回报潮里一百条事件也只重建一次(每帧一次), 不是每条事件一次。锁序:先缓存后账本;入账侧只持账本锁,不反向。

Source

pub fn ctp_form(&self) -> CtpForm

CTP 配置表单读(渲染克隆面)。

Source

pub fn set_ctp_form(&self, f: CtpForm)

CTP 配置表单写。

Source

pub fn row_selected(&self, table: &str, key: &str) -> bool

该行是否为所属表的选中行(渲染判断;无键 = 未选)。

Source

pub fn select_row(&self, table: &str, key: &str)

设所属表的选中行(每表一行;同键重复点 = 保持)。

Trait Implementations§

Source§

impl Debug for UiShared

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for UiShared

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more