pub struct SimGatewayPlugin { /* private fields */ }Expand description
纸面网关插件(四口 ask + eBar./eTick. 撮合驱动)。
Implementations§
Trait Implementations§
Source§impl Default for SimGatewayPlugin
impl Default for SimGatewayPlugin
Source§impl Plugin for SimGatewayPlugin
impl Plugin for SimGatewayPlugin
Source§fn routes(&self) -> Vec<Cow<'static, str>>
fn routes(&self) -> Vec<Cow<'static, str>>
订阅的 type 集合:广播 type(如业务常量 “eTick.”)、
自身的寻址 type(e_req_type(本名)/e_to_type(本名))。
宿主 start() 装配 forwarder → 邮箱 → on_mail。
Source§fn mailbox_cap(&self) -> usize
fn mailbox_cap(&self) -> usize
邮箱容量覆写(D5:按插件可小可大,默认
MAILBOX_CAP)。Source§fn services(&self) -> Vec<ServiceDesc>
fn services(&self) -> Vec<ServiceDesc>
服务目录自报(纯声明):只在 add_plugin 时被宿主读取一次抽
id 织入路由索引;
之后 ctx.services_of/find_service/ask_service 需要明细时由宿主现场调用本方法取。 Read moreSource§fn on_init(&self, ctx: &PluginContext)
fn on_init(&self, ctx: &PluginContext)
可选:启动前纯接线(缓存 ctx、读配置)。禁止在此 put/注册 handler(规范)。
Auto Trait Implementations§
impl !Freeze for SimGatewayPlugin
impl RefUnwindSafe for SimGatewayPlugin
impl Send for SimGatewayPlugin
impl Sync for SimGatewayPlugin
impl Unpin for SimGatewayPlugin
impl UnsafeUnpin for SimGatewayPlugin
impl UnwindSafe for SimGatewayPlugin
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
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>
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)
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)
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.