[−][src]Struct kas::Future
A future value, pending UI operation
This is a simpler form of future than the std::future::Future
trait,
relying on the UI event system for execution. It also does not come with a
waker; since calling into widget code is only possible through the event
system, an UpdateHandle
should be used to wake the recipient.
Implementations
impl<T: 'static> Future<T>
[src]
pub fn new_box_fnmut<U: 'static>(
f: Box<dyn FnMut(&mut U) -> T>
) -> (Self, Box<dyn FnMut(&mut U)>)
[src]
f: Box<dyn FnMut(&mut U) -> T>
) -> (Self, Box<dyn FnMut(&mut U)>)
Construct, given a boxed closure to produce the final value
Returns the future and a finish
closure to set the value when done.
pub fn is_finished(&self) -> bool
[src]
Check whether this is finished
pub fn try_finish(self) -> Result<T, Self>
[src]
Returns a result on completion
It may be worth checking Future::is_finished
before calling this method.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Future<T>
impl<T> !Send for Future<T>
impl<T> !Sync for Future<T>
impl<T> Unpin for Future<T>
impl<T> !UnwindSafe for Future<T>
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,
pub 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.
pub 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>,