pub struct ServiceBus { /* private fields */ }Expand description
服务间共享句柄袋:按类型(TypeId)存取 Arc<T>。廉价克隆(内部 Arc)。
用于服务之间发布/查找共享句柄,典型场景:adapter 发布 Bot,dispatch 取用。
Implementations§
Source§impl ServiceBus
impl ServiceBus
Sourcepub fn new() -> ServiceBus
pub fn new() -> ServiceBus
空 bus。
Trait Implementations§
Source§impl Clone for ServiceBus
impl Clone for ServiceBus
Source§fn clone(&self) -> ServiceBus
fn clone(&self) -> ServiceBus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ServiceBus
impl Default for ServiceBus
Source§fn default() -> ServiceBus
fn default() -> ServiceBus
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServiceBus
impl RefUnwindSafe for ServiceBus
impl Send for ServiceBus
impl Sync for ServiceBus
impl Unpin for ServiceBus
impl UnsafeUnpin for ServiceBus
impl UnwindSafe for ServiceBus
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