pub enum DispatchMode {
Sequential,
Concurrent,
Detached,
}Expand description
事件分发模式 | Event dispatch mode
控制监听器的执行方式:顺序、并行、后台。 Controls how listeners are executed: sequential, concurrent, or background.
Variants§
Sequential
顺序执行,await 全部监听器(默认,兼容旧行为)
Sequential execution, awaiting all listeners (default, compatible with old behavior).
Concurrent
并行执行,await 全部监听器
Concurrent execution, awaiting all listeners in parallel.
Detached
后台执行,不阻塞 publish 调用方返回
Detached execution, does not block the publisher.
Trait Implementations§
Source§impl Clone for DispatchMode
impl Clone for DispatchMode
Source§fn clone(&self) -> DispatchMode
fn clone(&self) -> DispatchMode
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 moreimpl Copy for DispatchMode
Source§impl Debug for DispatchMode
impl Debug for DispatchMode
Source§impl Default for DispatchMode
impl Default for DispatchMode
Source§fn default() -> DispatchMode
fn default() -> DispatchMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DispatchMode
impl<'de> Deserialize<'de> for DispatchMode
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
impl Eq for DispatchMode
Source§impl PartialEq for DispatchMode
impl PartialEq for DispatchMode
Source§impl Serialize for DispatchMode
impl Serialize for DispatchMode
impl StructuralPartialEq for DispatchMode
Auto Trait Implementations§
impl Freeze for DispatchMode
impl RefUnwindSafe for DispatchMode
impl Send for DispatchMode
impl Sync for DispatchMode
impl Unpin for DispatchMode
impl UnsafeUnpin for DispatchMode
impl UnwindSafe for DispatchMode
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