pub struct NotifyOne<'c, N, P = (), F = (), const FIRST: bool = true> { /* private fields */ }Expand description
Notification builder that seeks, notifies and removes the first fitting object in a Chain.
Implementations§
Source§impl<'c, N: Subscriber, P, F, const FIRST: bool> NotifyOne<'c, N, P, F, FIRST>
impl<'c, N: Subscriber, P, F, const FIRST: bool> NotifyOne<'c, N, P, F, FIRST>
Sourcepub fn filter<X: Fn(&N) -> bool>(self, filter: X) -> NotifyOne<'c, N, X, F>
pub fn filter<X: Fn(&N) -> bool>(self, filter: X) -> NotifyOne<'c, N, X, F>
Configures the notification configuration with a boolean predicate that allows skipping the first sequence of objects that aren’t ready to be notified.
Sourcepub fn then<X: FnOnce(&N) -> R, R>(self, action: X) -> NotifyOne<'c, N, P, X>
pub fn then<X: FnOnce(&N) -> R, R>(self, action: X) -> NotifyOne<'c, N, P, X>
Configures what happens after a suitable object has been found for notification but before it is actually notified.
Sourcepub fn first(self) -> NotifyOne<'c, N, P, F, true>
pub fn first(self) -> NotifyOne<'c, N, P, F, true>
Selects the first item in the chain to be notified.
Trait Implementations§
Auto Trait Implementations§
impl<'c, N, P, F, const FIRST: bool> Freeze for NotifyOne<'c, N, P, F, FIRST>
impl<'c, N, P = (), F = (), const FIRST: bool = true> !RefUnwindSafe for NotifyOne<'c, N, P, F, FIRST>
impl<'c, N, P = (), F = (), const FIRST: bool = true> !Send for NotifyOne<'c, N, P, F, FIRST>
impl<'c, N, P = (), F = (), const FIRST: bool = true> !Sync for NotifyOne<'c, N, P, F, FIRST>
impl<'c, N, P, F, const FIRST: bool> Unpin for NotifyOne<'c, N, P, F, FIRST>
impl<'c, N, P = (), F = (), const FIRST: bool = true> !UnwindSafe for NotifyOne<'c, N, P, F, FIRST>
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