[−][src]Struct uniui_core::Signal
Signal can be used to inform others that new data is available.
There is two generic ways to subscribe for new data notificaitons:
Implementations
impl<T: 'static + Clone> Signal<T>
[src]
pub fn new() -> Signal<T>
[src]
Creates new instance
pub fn connect_func<F: 'static + FnMut(&T)>(&mut self, f: F)
[src]
Connect callback to the Signal
pub fn connect_slot(&mut self, slot: &dyn Slot<T>)
[src]
Connect Slot to the Signal
pub fn emit(&mut self, t: T)
[src]
Emit signal. During the call all related callbacks will be activated and data will be pushed to Slots' queues.
pub fn has_connections(&self) -> bool
[src]
Shows if signal connected to any callback and/or Slot.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Signal<T>
impl<T> !Send for Signal<T>
impl<T> !Sync for Signal<T>
impl<T> 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>,