pub struct SingleThreadedCallback<T>{ /* private fields */ }
Expand description
A single threaded or current threaded callback holder.
This callback holder will invoke the given events on the current thread, thus blocking the caller thread for other tasks.
Implementations§
Source§impl<T> SingleThreadedCallback<T>
impl<T> SingleThreadedCallback<T>
Trait Implementations§
Source§impl<T> Callback<T> for SingleThreadedCallback<T>
impl<T> Callback<T> for SingleThreadedCallback<T>
Source§fn subscribe(&self) -> Subscription<T>
fn subscribe(&self) -> Subscription<T>
Subscribe to the interested event.
This creates a new Subscription that will be invoked with a shared instance of the event when the interested event occurs. Read more
Source§fn subscribe_with(&self, subscriber: Subscriber<T>)
fn subscribe_with(&self, subscriber: Subscriber<T>)
Subscribe to the interested event with a Subscriber.
This creates an underlying new subscription which will be invoked with the given subscriber when the interested event occurs. Read more
Source§impl<T> Clone for SingleThreadedCallback<T>
impl<T> Clone for SingleThreadedCallback<T>
Source§fn clone(&self) -> SingleThreadedCallback<T>
fn clone(&self) -> SingleThreadedCallback<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for SingleThreadedCallback<T>
impl<T> RefUnwindSafe for SingleThreadedCallback<T>
impl<T> Send for SingleThreadedCallback<T>
impl<T> Sync for SingleThreadedCallback<T>
impl<T> Unpin for SingleThreadedCallback<T>
impl<T> UnwindSafe for SingleThreadedCallback<T>
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