[−][src]Struct pinky_swear::PinkyBroadcaster
A PinkyBroadcaster allows you to broacast a promise resolution to several subscribers.
Methods
impl<T: Send + Clone + 'static, S: Send + 'static> PinkyBroadcaster<T, S>
[src]
pub fn new(promise: PinkySwear<T, S>) -> Self
[src]
Create a new PinkyBroadcaster from a PinkySwear.
pub fn subscribe(&self) -> PinkySwear<T, S>
[src]
Subscribe to receive a broacast when the underlying promise get henoured.
pub fn swear(&self, data: T)
[src]
Resolve the underlying promise and broadcast the result to subscribers.
Trait Implementations
impl<T: Clone, S> Clone for PinkyBroadcaster<T, S>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Clone, S> Debug for PinkyBroadcaster<T, S>
[src]
impl<T: Send + Clone + 'static, S: Send + 'static> Default for PinkyBroadcaster<T, S>
[src]
impl<T: Send + Clone + 'static, S: Send + 'static> NotifyReady for PinkyBroadcaster<T, S>
[src]
Auto Trait Implementations
impl<T, S = ()> !RefUnwindSafe for PinkyBroadcaster<T, S>
impl<T, S> Send for PinkyBroadcaster<T, S> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<T, S> Sync for PinkyBroadcaster<T, S> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<T, S> Unpin for PinkyBroadcaster<T, S>
impl<T, S = ()> !UnwindSafe for PinkyBroadcaster<T, S>
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,