[−][src]Struct pinky_swear::PinkySwear
A PinkySwear is a Promise that the other party is supposed to honour at some point.
Methods
impl<T: Send + 'static, S: 'static> PinkySwear<T, S>
[src]
pub fn new() -> (Self, Pinky<T, S>)
[src]
Create a new PinkySwear and its associated Pinky.
pub fn after<B: 'static>(promise: PinkySwear<S, B>) -> (Self, Pinky<T, S>) where
S: Send,
[src]
S: Send,
Wait for this promise only once the given one is honoured.
pub fn new_with_data(data: T) -> Self
[src]
Create a new PinkySwear and honour it at the same time.
pub fn try_wait(&self) -> Option<T>
[src]
Check whether the Promise has been honoured or not.
pub fn wait(&self) -> T
[src]
Wait until the Promise has been honoured.
pub fn subscribe(&self, task: Box<dyn NotifyReady + Send>)
[src]
Get notified once the Promise has been honoured.
pub fn has_subscriber(&self) -> bool
[src]
Will someone get notified once the Promise is honoured?
ⓘImportant traits for PinkySwear<T, S>pub fn traverse<F: Send + 'static>(
self,
transform: Box<dyn Fn(T) -> F + Send>
) -> PinkySwear<F, T>
[src]
ⓘImportant traits for PinkySwear<T, S>
self,
transform: Box<dyn Fn(T) -> F + Send>
) -> PinkySwear<F, T>
Apply a tranformation to the result of a PinkySwear.
Trait Implementations
impl<T, S> Debug for PinkySwear<T, S>
[src]
impl<T: Send + 'static, S: 'static> Future for PinkySwear<T, S>
[src]
Auto Trait Implementations
impl<T, S = ()> !RefUnwindSafe for PinkySwear<T, S>
impl<T, S> Send for PinkySwear<T, S> where
T: Send,
T: Send,
impl<T, S = ()> !Sync for PinkySwear<T, S>
impl<T, S> Unpin for PinkySwear<T, S>
impl<T, S = ()> !UnwindSafe for PinkySwear<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, 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>,