Struct futures_bounded::FuturesSet
source · pub struct FuturesSet<O> { /* private fields */ }
Expand description
Represents a list of Futures.
Each future must finish within the specified time and the list never outgrows its capacity.
Implementations§
source§impl<O> FuturesSet<O>
impl<O> FuturesSet<O>
sourcepub fn try_push<F>(&mut self, future: F) -> Result<(), BoxFuture<'_, O>>where
F: Future<Output = O> + Send + 'static,
pub fn try_push<F>(&mut self, future: F) -> Result<(), BoxFuture<'_, O>>where F: Future<Output = O> + Send + 'static,
Push a future into the list.
This method adds the given future to the list. If the length of the list is equal to the capacity, this method returns a error that contains the passed future. In that case, the future is not added to the set.
pub fn is_empty(&self) -> bool
pub fn poll_ready_unpin(&mut self, cx: &mut Context<'_>) -> Poll<()>
pub fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Result<O, Timeout>>
Auto Trait Implementations§
impl<O> !RefUnwindSafe for FuturesSet<O>
impl<O> Send for FuturesSet<O>
impl<O> !Sync for FuturesSet<O>
impl<O> Unpin for FuturesSet<O>
impl<O> !UnwindSafe for FuturesSet<O>
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