[−][src]Struct revent::Signal
Signal of interest, contains subscribers.
Signals are channels on which we can emit events synchronously. This is done by Signal::emit. Signals are not be created by the user directly, but are rather created via the hub and node macros.
Methods
impl<T: ?Sized> Signal<T>
[src]
pub fn emit<F>(&mut self, caller: F) where
F: FnMut(&mut T),
[src]
F: FnMut(&mut T),
Access all subscribers and apply a closure to each.
Subscribers are iterated in subscription order.
pub fn remove<F>(&mut self, predicate: F) where
F: FnMut(&mut T) -> bool,
[src]
F: FnMut(&mut T) -> bool,
Remove subscribers from a topic given a predicate. True removes the item.
Removing items does not perturb relative ordering.
pub fn sort_by<F>(&mut self, compare: F) where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
Sorts the topic with a comparator function.
Auto Trait Implementations
impl<T> !RefUnwindSafe for Signal<T>
impl<T> !Send for Signal<T>
impl<T> !Sync for Signal<T>
impl<T: ?Sized> Unpin for Signal<T>
impl<T> !UnwindSafe for Signal<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,