[−][src]Struct sealrs::futures::future::Future
Fields
value: Option<Result<V, E>>
Methods
impl<V: Send + Clone, E: Send + Clone> Future<V, E>
[src]
pub fn asyncp<F>(f: F, executor: TSafe<dyn Executor>) -> WrappedFuture<V, E> where
F: FnMut() -> Result<V, E> + Send + 'static,
[src]
F: FnMut() -> Result<V, E> + Send + 'static,
Syntactic sugar for creating of AsyncPromise and extracting it's future
pub fn ok(value: V) -> WrappedFuture<V, E>
[src]
Creates already completed future with Ok result
pub fn err(err: E) -> WrappedFuture<V, E>
[src]
Creates already completed future with Err result
pub fn new() -> Future<V, E>
[src]
pub fn is_completed(&self) -> bool
[src]
Return current completion state
pub fn complete(&mut self, result: Result<V, E>)
[src]
Fills the value of the futures. This function is called from the promise of which the future belongs and it should never be called by the application code, otherwise it will lead to a breakdown of the future execution logic.
pub fn map<S>(
&mut self,
f: Box<dyn FnMut(&V) -> Result<S, E> + Send>
) -> WrappedFuture<S, E> where
S: Send + Clone + 'static,
[src]
&mut self,
f: Box<dyn FnMut(&V) -> Result<S, E> + Send>
) -> WrappedFuture<S, E> where
S: Send + Clone + 'static,
See mirror in WrappedFuture
pub fn recover(
&mut self,
f: Box<dyn FnMut(&E) -> Result<V, E> + Send>
) -> WrappedFuture<V, E>
[src]
&mut self,
f: Box<dyn FnMut(&E) -> Result<V, E> + Send>
) -> WrappedFuture<V, E>
See mirror in WrappedFuture
pub fn flat_map<S>(
&mut self,
f: Box<dyn FnMut(&V) -> Result<WrappedFuture<S, E>, E> + Send>
) -> WrappedFuture<S, E> where
S: Send + Clone + 'static,
[src]
&mut self,
f: Box<dyn FnMut(&V) -> Result<WrappedFuture<S, E>, E> + Send>
) -> WrappedFuture<S, E> where
S: Send + Clone + 'static,
See mirror in WrappedFuture
pub fn map_err<X>(
&mut self,
f: Box<dyn FnMut(&E) -> Result<V, X> + Send>
) -> WrappedFuture<V, X> where
X: Send + Clone + 'static,
[src]
&mut self,
f: Box<dyn FnMut(&E) -> Result<V, X> + Send>
) -> WrappedFuture<V, X> where
X: Send + Clone + 'static,
pub fn on_complete(&mut self, f: Box<dyn FnMut(&Result<V, E>) + Send>)
[src]
See mirror in WrappedFuture
pub fn ready(&mut self, _timeout: Duration) -> Result<(), Receiver<bool>>
[src]
Returns Ok if future is completed of channel wich will be filled when future will be completed
Auto Trait Implementations
impl<V, E> Send for Future<V, E>
impl<V, E> Unpin for Future<V, E> where
E: Unpin,
V: Unpin,
E: Unpin,
V: Unpin,
impl<V, E> !Sync for Future<V, E>
impl<V, E> !UnwindSafe for Future<V, E>
impl<V, E> !RefUnwindSafe for Future<V, E>
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,