pub struct EventBusConfig {
pub dispatch_mode: DispatchMode,
pub listener_timeout: Option<Duration>,
}Expand description
EventBus 运行时配置 | EventBus runtime configuration
Fields§
§dispatch_mode: DispatchMode分发模式 | Dispatch mode
listener_timeout: Option<Duration>单个监听器最大执行时长;None 表示不限时
Maximum execution time per listener; None means no timeout.
Implementations§
Source§impl EventBusConfig
impl EventBusConfig
Sourcepub fn no_timeout() -> Self
pub fn no_timeout() -> Self
创建无超时限制的配置(用于向后兼容)
Creates a config with no timeout (for backward compatibility).
Trait Implementations§
Source§impl Clone for EventBusConfig
impl Clone for EventBusConfig
Source§fn clone(&self) -> EventBusConfig
fn clone(&self) -> EventBusConfig
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 Debug for EventBusConfig
impl Debug for EventBusConfig
Source§impl Default for EventBusConfig
impl Default for EventBusConfig
Source§impl<'de> Deserialize<'de> for EventBusConfig
impl<'de> Deserialize<'de> for EventBusConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EventBusConfig
impl RefUnwindSafe for EventBusConfig
impl Send for EventBusConfig
impl Sync for EventBusConfig
impl Unpin for EventBusConfig
impl UnsafeUnpin for EventBusConfig
impl UnwindSafe for EventBusConfig
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