pub enum NotifyStrategy {
StopOnError,
IgnoreError,
}Expand description
通知策略
定义当观察者处理更新失败时的行为。
Variants§
StopOnError
立即停止并返回错误
这是默认策略,当一个观察者失败时立即停止通知过程。
IgnoreError
忽略错误并继续通知
即使某个观察者失败,也继续通知其他观察者。 错误会被忽略,继续执行。
Trait Implementations§
Source§impl Clone for NotifyStrategy
impl Clone for NotifyStrategy
Source§fn clone(&self) -> NotifyStrategy
fn clone(&self) -> NotifyStrategy
Returns a duplicate of the value. Read more
1.0.0 · 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 NotifyStrategy
impl Debug for NotifyStrategy
Source§impl PartialEq for NotifyStrategy
impl PartialEq for NotifyStrategy
impl Copy for NotifyStrategy
impl Eq for NotifyStrategy
impl StructuralPartialEq for NotifyStrategy
Auto Trait Implementations§
impl Freeze for NotifyStrategy
impl RefUnwindSafe for NotifyStrategy
impl Send for NotifyStrategy
impl Sync for NotifyStrategy
impl Unpin for NotifyStrategy
impl UnsafeUnpin for NotifyStrategy
impl UnwindSafe for NotifyStrategy
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