Struct futures_bounded::FuturesTupleSet
source · pub struct FuturesTupleSet<O, D> { /* private fields */ }
Expand description
Represents a list of tuples of a Future and an associated piece of data.
Each future must finish within the specified time and the list never outgrows its capacity.
Implementations§
source§impl<O, D> FuturesTupleSet<O, D>where
O: 'static,
impl<O, D> FuturesTupleSet<O, D>where
O: 'static,
sourcepub fn try_push<F>(
&mut self,
future: F,
data: D
) -> Result<(), (BoxFuture<'_, O>, D)>
pub fn try_push<F>( &mut self, future: F, data: D ) -> Result<(), (BoxFuture<'_, O>, D)>
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 len(&self) -> usize
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>, D)>
Auto Trait Implementations§
impl<O, D> !Freeze for FuturesTupleSet<O, D>
impl<O, D> !RefUnwindSafe for FuturesTupleSet<O, D>
impl<O, D> Send for FuturesTupleSet<O, D>where
D: Send,
impl<O, D> !Sync for FuturesTupleSet<O, D>
impl<O, D> Unpin for FuturesTupleSet<O, D>where
D: Unpin,
impl<O, D> !UnwindSafe for FuturesTupleSet<O, D>
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