[][src]Struct pinky_swear::PinkyBroadcaster

#[must_use = "PinkyBroadcaster must be subscribed"]pub struct PinkyBroadcaster<T: Clone> { /* fields omitted */ }

A PinkyBroadcaster allows you to broacast a promise resolution to several subscribers.

Implementations

impl<T: Send + Clone + 'static> PinkyBroadcaster<T>[src]

pub fn set_marker(&self, marker: String)[src]

Add a marker to logs

pub fn subscribe(&self) -> PinkySwear<T>

Notable traits for PinkySwear<T>

impl<T: Send + 'static> Future for PinkySwear<T> type Output = T;
[src]

Subscribe to receive a broacast when the underlying promise get henoured.

pub fn unsubscribe(&self, promise: PinkySwear<T>)[src]

Unsubscribe a promise from the broadcast.

pub fn swear(&self, data: T)[src]

Resolve the underlying promise and broadcast the result to subscribers.

Trait Implementations

impl<T: Clone> Debug for PinkyBroadcaster<T>[src]

impl<T: Send + Clone + 'static> Default for PinkyBroadcaster<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for PinkyBroadcaster<T>[src]

impl<T> Send for PinkyBroadcaster<T> where
    T: Send
[src]

impl<T> Sync for PinkyBroadcaster<T> where
    T: Send
[src]

impl<T> Unpin for PinkyBroadcaster<T>[src]

impl<T> !UnwindSafe for PinkyBroadcaster<T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.