pub struct CompleterFuture<T> { /* private fields */ }Expand description
A Completer’s future. Every clone resolves with its own clone of the value, as every
await of one Dart future sees the same result.
Implementations§
Source§impl<T> CompleterFuture<T>
impl<T> CompleterFuture<T>
Sourcepub fn ready(value: T) -> CompleterFuture<T> ⓘ
pub fn ready(value: T) -> CompleterFuture<T> ⓘ
A future that is already complete: Dart’s Future.value and SynchronousFuture.
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Whether the value is known yet — what Dart learns by handing then a callback and
seeing whether it ran synchronously.
Source§impl<T> CompleterFuture<T>where
T: Clone + 'static,
impl<T> CompleterFuture<T>where
T: Clone + 'static,
Sourcepub fn spawn(
app: &App,
future: impl Future<Output = T> + 'static,
) -> CompleterFuture<T> ⓘ
pub fn spawn( app: &App, future: impl Future<Output = T> + 'static, ) -> CompleterFuture<T> ⓘ
Runs future as a task and hands out its result as a completer’s future: the future
of a Dart async function whose body awaits, for a method that returns a nameable,
shareable future over an awaited chain.
Trait Implementations§
Source§impl<T> Clone for CompleterFuture<T>
impl<T> Clone for CompleterFuture<T>
Source§fn clone(&self) -> CompleterFuture<T> ⓘ
fn clone(&self) -> CompleterFuture<T> ⓘ
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> Future for CompleterFuture<T>where
T: Clone,
impl<T> Future for CompleterFuture<T>where
T: Clone,
Auto Trait Implementations§
impl<T> !RefUnwindSafe for CompleterFuture<T>
impl<T> !Send for CompleterFuture<T>
impl<T> !Sync for CompleterFuture<T>
impl<T> !UnwindSafe for CompleterFuture<T>
impl<T> Forget for CompleterFuture<T>
impl<T> Freeze for CompleterFuture<T>
impl<T> Move for CompleterFuture<T>
impl<T> Unpin for CompleterFuture<T>
impl<T> UnsafeUnpin for CompleterFuture<T>where
*const RcInner<Shared<T>> is !null: UnsafeUnpin,
PhantomData<RcInner<Shared<T>>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<F> FutureExt for F
impl<F> FutureExt for F
Source§fn catch_unwind(self) -> CatchUnwind<Self> ⓘwhere
Self: Sized + UnwindSafe,
fn catch_unwind(self) -> CatchUnwind<Self> ⓘwhere
Self: Sized + UnwindSafe,
Catches panics while polling the future. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more