Struct tokio_test::task::Spawn [−][src]
pub struct Spawn<T> { /* fields omitted */ }
Expand description
Future spawned on a mock task
Implementations
impl<T> Spawn<T>
[src]
impl<T> Spawn<T>
[src]pub fn into_inner(self) -> T where
T: Unpin,
[src]
pub fn into_inner(self) -> T where
T: Unpin,
[src]Consumes self
returning the inner value
pub fn is_woken(&self) -> bool
[src]
pub fn is_woken(&self) -> bool
[src]Returns true
if the inner future has received a wake notification
since the last call to enter
.
pub fn waker_ref_count(&self) -> usize
[src]
pub fn waker_ref_count(&self) -> usize
[src]Returns the number of references to the task waker
The task itself holds a reference. The return value will never be zero.
Trait Implementations
impl<T: Stream> Stream for Spawn<T>
[src]
impl<T: Stream> Stream for Spawn<T>
[src]Auto Trait Implementations
impl<T> !RefUnwindSafe for Spawn<T>
impl<T> Send for Spawn<T> where
T: Send,
T: Send,
impl<T> Sync for Spawn<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Spawn<T>
impl<T> !UnwindSafe for Spawn<T>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<F> IntoFuture for F where
F: Future,
[src]
impl<F> IntoFuture for F where
F: Future,
[src]type Output = <F as Future>::Output
type Output = <F as Future>::Output
into_future
)The output that the future will produce on completion.
type Future = F
type Future = F
into_future
)Which kind of future are we turning this into?
pub fn into_future(self) -> <F as IntoFuture>::Future
[src]
pub fn into_future(self) -> <F as IntoFuture>::Future
[src]into_future
)Creates a future from a value.
impl<St> StreamExt for St where
St: Stream + ?Sized,
[src]
impl<St> StreamExt for St where
St: Stream + ?Sized,
[src]fn next(&mut self) -> Next<'_, Self> where
Self: Unpin,
[src]
fn next(&mut self) -> Next<'_, Self> where
Self: Unpin,
[src]Consumes and returns the next value in the stream or None
if the
stream is finished. Read more
fn try_next<T, E>(&mut self) -> TryNext<'_, Self> where
Self: Stream<Item = Result<T, E>> + Unpin,
[src]
fn try_next<T, E>(&mut self) -> TryNext<'_, Self> where
Self: Stream<Item = Result<T, E>> + Unpin,
[src]Consumes and returns the next item in the stream. If an error is encountered before the next item, the error is returned instead. Read more
fn map<T, F>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> T,
[src]
fn map<T, F>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> T,
[src]Maps this stream’s items to a different type, returning a new stream of the resulting type. Read more
fn merge<U>(self, other: U) -> Merge<Self, U> where
U: Stream<Item = Self::Item>,
[src]
fn merge<U>(self, other: U) -> Merge<Self, U> where
U: Stream<Item = Self::Item>,
[src]Combine two streams into one by interleaving the output of both as it is produced. Read more
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]Filters the values produced by this stream according to the provided predicate. Read more
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Option<T>,
[src]
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Option<T>,
[src]Filters the values produced by this stream while simultaneously mapping them to a different type according to the provided closure. Read more
fn take(self, n: usize) -> Take<Self>
[src]
fn take(self, n: usize) -> Take<Self>
[src]Creates a new stream of at most n
items of the underlying stream. Read more
fn take_while<F>(self, f: F) -> TakeWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
fn take_while<F>(self, f: F) -> TakeWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]Take elements from this stream while the provided predicate
resolves to true
. Read more
fn skip(self, n: usize) -> Skip<Self>
[src]
fn skip(self, n: usize) -> Skip<Self>
[src]Creates a new stream that will skip the n
first items of the
underlying stream. Read more
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]Skip elements from the underlying stream while the provided predicate
resolves to true
. Read more
fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F> where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
[src]
fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F> where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
[src]Tests if every element of the stream matches a predicate. Read more
fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F> where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
[src]
fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F> where
Self: Unpin,
F: FnMut(Self::Item) -> bool,
[src]Tests if any element of the stream matches a predicate. Read more
fn chain<U>(self, other: U) -> Chain<Self, U> where
U: Stream<Item = Self::Item>,
[src]
fn chain<U>(self, other: U) -> Chain<Self, U> where
U: Stream<Item = Self::Item>,
[src]Combine two streams into one by first returning all values from the first stream then all values from the second stream. Read more
fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, B, F> where
F: FnMut(B, Self::Item) -> B,
[src]
fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, B, F> where
F: FnMut(B, Self::Item) -> B,
[src]A combinator that applies a function to every element in a stream producing a single, final value. Read more
fn collect<T>(self) -> Collect<Self, T> where
T: FromStream<Self::Item>,
[src]
fn collect<T>(self) -> Collect<Self, T> where
T: FromStream<Self::Item>,
[src]Drain stream pushing all emitted values into a collection. Read more