pub struct InMemoryCommandBus { /* private fields */ }Expand description
基于内存的 CommandBus 实现
- 通过 (CommandTypeId, ResultTypeId) 注册不同 Command 对应的 Handler
- 运行时以类型擦除(Any)方式进行调度,并在调用端进行结果还原
Implementations§
Source§impl InMemoryCommandBus
impl InMemoryCommandBus
Sourcepub fn registered_commands(&self) -> Vec<&'static str>
pub fn registered_commands(&self) -> Vec<&'static str>
获取已注册的命令类型名列表(只读视图)
Trait Implementations§
Source§impl CommandBus for InMemoryCommandBus
impl CommandBus for InMemoryCommandBus
Auto Trait Implementations§
impl Freeze for InMemoryCommandBus
impl !RefUnwindSafe for InMemoryCommandBus
impl Send for InMemoryCommandBus
impl Sync for InMemoryCommandBus
impl Unpin for InMemoryCommandBus
impl UnsafeUnpin for InMemoryCommandBus
impl !UnwindSafe for InMemoryCommandBus
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