Home
last modified time | relevance | path

Searched refs:Fut (Results 1 – 25 of 90) sorted by relevance

1234

/external/rust/crates/futures-util/src/stream/futures_unordered/
Diter.rs9 pub struct IterPinMut<'a, Fut> {
10 pub(super) task: *const Task<Fut>,
12 pub(super) _marker: PhantomData<&'a mut FuturesUnordered<Fut>>
17 pub struct IterMut<'a, Fut: Unpin> (pub(super) IterPinMut<'a, Fut>);
21 pub struct IterPinRef<'a, Fut> {
22 pub(super) task: *const Task<Fut>,
24 pub(super) pending_next_all: *mut Task<Fut>,
25 pub(super) _marker: PhantomData<&'a FuturesUnordered<Fut>>
30 pub struct Iter<'a, Fut: Unpin> (pub(super) IterPinRef<'a, Fut>);
32 impl<'a, Fut> Iterator for IterPinMut<'a, Fut> {
[all …]
Dmod.rs55 pub struct FuturesUnordered<Fut> {
56 ready_to_run_queue: Arc<ReadyToRunQueue<Fut>>,
57 head_all: AtomicPtr<Task<Fut>>,
61 unsafe impl<Fut: Send> Send for FuturesUnordered<Fut> {}
62 unsafe impl<Fut: Sync> Sync for FuturesUnordered<Fut> {}
63 impl<Fut> Unpin for FuturesUnordered<Fut> {}
108 impl<Fut> Default for FuturesUnordered<Fut> {
114 impl<Fut> FuturesUnordered<Fut> {
130 let stub_ptr = &*stub as *const Task<Fut>; in new()
166 pub fn push(&self, future: Fut) { in push() argument
[all …]
Dtask.rs10 pub(super) struct Task<Fut> {
12 pub(super) future: UnsafeCell<Option<Fut>>,
16 pub(super) next_all: AtomicPtr<Task<Fut>>,
19 pub(super) prev_all: UnsafeCell<*const Task<Fut>>,
27 pub(super) next_ready_to_run: AtomicPtr<Task<Fut>>,
30 pub(super) ready_to_run_queue: Weak<ReadyToRunQueue<Fut>>,
41 unsafe impl<Fut> Send for Task<Fut> {}
42 unsafe impl<Fut> Sync for Task<Fut> {}
44 impl<Fut> ArcWake for Task<Fut> {
71 impl<Fut> Task<Fut> {
[all …]
/external/rust/crates/futures-util/src/future/future/
Dshared.rs14 pub struct Shared<Fut: Future> {
15 inner: Option<Arc<Inner<Fut>>>,
19 struct Inner<Fut: Future> {
20 future_or_output: UnsafeCell<FutureOrOutput<Fut>>,
30 pub struct WeakShared<Fut: Future>(Weak<Inner<Fut>>);
34 impl<Fut: Future> Unpin for Shared<Fut> {}
36 impl<Fut: Future> fmt::Debug for Shared<Fut> {
45 impl<Fut: Future> fmt::Debug for Inner<Fut> {
51 impl<Fut: Future> fmt::Debug for WeakShared<Fut> {
57 enum FutureOrOutput<Fut: Future> {
[all …]
Dflatten.rs26 impl<Fut> FusedFuture for Flatten<Fut, Fut::Output>
27 where Fut: Future,
28 Fut::Output: Future,
38 impl<Fut> Future for Flatten<Fut, Fut::Output>
39 where Fut: Future,
40 Fut::Output: Future,
42 type Output = <Fut::Output as Future>::Output;
62 impl<Fut> FusedStream for Flatten<Fut, Fut::Output>
63 where Fut: Future,
64 Fut::Output: Stream,
[all …]
Dfuse.rs11 pub struct Fuse<Fut> {
13 inner: Option<Fut>,
17 impl<Fut> Fuse<Fut> {
18 pub(super) fn new(f: Fut) -> Self { in new()
23 impl<Fut: Future> Fuse<Fut> {
74 impl<Fut: Future> FusedFuture for Fuse<Fut> {
80 impl<Fut: Future> Future for Fuse<Fut> {
81 type Output = Fut::Output;
83 fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Fut::Output> { in poll()
/external/crosvm/cros_async/src/
Dcomplete.rs21 ($Complete:ident, <$($Fut:ident),*>),
24 pub(crate) struct $Complete<$($Fut: Future),*> {
25 $($Fut: MaybeDone<$Fut>,)*
28 impl<$($Fut),*> $Complete<$($Fut),*>
30 $Fut: Future,
38 unsafe_pinned!($Fut: MaybeDone<$Fut>);
41 pub(crate) fn new($($Fut: $Fut),*) -> $Complete<$($Fut),*> {
43 let $Fut = maybe_done($Fut);
46 $($Fut),*
51 impl<$($Fut),*> Future for $Complete<$($Fut),*>
[all …]
Dselect.rs25 ($Select:ident, <$($Fut:ident),*>),
29 pub(crate) struct $Select<$($Fut: Future + Unpin),*> {
30 $($Fut: MaybeDone<$Fut>,)*
34 impl<$($Fut: Future + Unpin),*> $Select<$($Fut),*> {
36 pub(crate) fn new($($Fut: $Fut),*) -> $Select<$($Fut),*> {
38 $($Fut: maybe_done($Fut),)*
44 impl<$($Fut: Future + Unpin),*> Future for $Select<$($Fut),*> {
45 type Output = ($(SelectResult<$Fut>),*);
50 let $Fut = Pin::new(&mut self.$Fut);
53 complete |= self.$Fut.poll_unpin(cx).is_ready();
[all …]
/external/rust/crates/futures-util/src/future/try_future/
Dtry_flatten.rs26 impl<Fut> FusedFuture for TryFlatten<Fut, Fut::Ok>
27 where Fut: TryFuture,
28 Fut::Ok: TryFuture<Error=Fut::Error>,
38 impl<Fut> Future for TryFlatten<Fut, Fut::Ok>
39 where Fut: TryFuture,
40 Fut::Ok: TryFuture<Error=Fut::Error>,
42 type Output = Result<<Fut::Ok as TryFuture>::Ok, Fut::Error>;
67 impl<Fut> FusedStream for TryFlatten<Fut, Fut::Ok>
68 where Fut: TryFuture,
69 Fut::Ok: TryStream<Error=Fut::Error>,
[all …]
Dmod.rs46 TryFlattenStream<Fut>(
47 try_flatten::TryFlatten<Fut, Fut::Ok>
48 ): Debug + Sink + Stream + FusedStream + New[|x: Fut| try_flatten::TryFlatten::new(x)]
49 where Fut: TryFuture
56 FlattenSink<Fut, Si>(
57 try_flatten::TryFlatten<Fut, Si>
58 ): Debug + Sink + Stream + FusedStream + New[|x: Fut| try_flatten::TryFlatten::new(x)]
77 ErrInto<Fut, E>(
78 MapErr<Fut, IntoFn<E>>
79 ): Debug + Future + FusedFuture + New[|x: Fut| MapErr::new(x, into_fn())]
[all …]
/external/rust/crates/futures-util/src/future/
Dtry_maybe_done.rs14 pub enum TryMaybeDone<Fut: TryFuture> {
16 Future(/* #[pin] */ Fut),
18 Done(Fut::Ok),
25 impl<Fut: TryFuture + Unpin> Unpin for TryMaybeDone<Fut> {}
28 pub fn try_maybe_done<Fut: TryFuture>(future: Fut) -> TryMaybeDone<Fut> { in try_maybe_done() argument
29 assert_future::<Result<(), Fut::Error>, _>(TryMaybeDone::Future(future)) in try_maybe_done()
32 impl<Fut: TryFuture> TryMaybeDone<Fut> {
38 pub fn output_mut(self: Pin<&mut Self>) -> Option<&mut Fut::Ok> { in output_mut()
50 pub fn take_output(self: Pin<&mut Self>) -> Option<Fut::Ok> { in take_output()
64 impl<Fut: TryFuture> FusedFuture for TryMaybeDone<Fut> {
[all …]
Djoin.rs14 ($Join:ident, <$($Fut:ident),*>),
19 pub struct $Join<$($Fut: Future),*> {
20 $(#[pin] $Fut: MaybeDone<$Fut>,)*
24 impl<$($Fut),*> fmt::Debug for $Join<$($Fut),*>
27 $Fut: Future + fmt::Debug,
28 $Fut::Output: fmt::Debug,
33 $(.field(stringify!($Fut), &self.$Fut))*
38 impl<$($Fut: Future),*> $Join<$($Fut),*> {
39 fn new($($Fut: $Fut),*) -> Self {
41 $($Fut: maybe_done($Fut)),*
[all …]
Dmaybe_done.rs14 pub enum MaybeDone<Fut: Future> {
16 Future(/* #[pin] */ Fut),
18 Done(Fut::Output),
24 impl<Fut: Future + Unpin> Unpin for MaybeDone<Fut> {}
43 pub fn maybe_done<Fut: Future>(future: Fut) -> MaybeDone<Fut> { in maybe_done() argument
47 impl<Fut: Future> MaybeDone<Fut> {
53 pub fn output_mut(self: Pin<&mut Self>) -> Option<&mut Fut::Output> { in output_mut()
65 pub fn take_output(self: Pin<&mut Self>) -> Option<Fut::Output> { in take_output()
79 impl<Fut: Future> FusedFuture for MaybeDone<Fut> {
88 impl<Fut: Future> Future for MaybeDone<Fut> {
/external/rust/crates/futures-util/src/stream/stream/
Dtake_until.rs16 pub struct TakeUntil<St: Stream, Fut: Future> {
22 fut: Option<Fut>,
24 fut_result: Option<Fut::Output>,
30 impl<St, Fut> fmt::Debug for TakeUntil<St, Fut>
34 Fut: Future + fmt::Debug,
44 impl<St, Fut> TakeUntil<St, Fut>
47 Fut: Future,
49 pub(super) fn new(stream: St, fut: Fut) -> Self { in new()
64 pub fn take_future(&mut self) -> Option<Fut> { in take_future() argument
108 pub fn take_result(&mut self) -> Option<Fut::Output> { in take_result()
[all …]
Dfilter_map.rs15 pub struct FilterMap<St, Fut, F> {
20 pending: Option<Fut>,
24 impl<St, Fut, F> fmt::Debug for FilterMap<St, Fut, F>
27 Fut: fmt::Debug,
37 impl<St, Fut, F> FilterMap<St, Fut, F>
39 F: FnMut(St::Item) -> Fut,
40 Fut: Future,
49 impl<St, Fut, F, T> FusedStream for FilterMap<St, Fut, F>
51 F: FnMut1<St::Item, Output=Fut>,
52 Fut: Future<Output = Option<T>>,
[all …]
Dfor_each.rs12 pub struct ForEach<St, Fut, F> {
17 future: Option<Fut>,
21 impl<St, Fut, F> fmt::Debug for ForEach<St, Fut, F>
24 Fut: fmt::Debug,
34 impl<St, Fut, F> ForEach<St, Fut, F>
36 F: FnMut(St::Item) -> Fut,
37 Fut: Future<Output = ()>,
48 impl<St, Fut, F> FusedFuture for ForEach<St, Fut, F>
50 F: FnMut(St::Item) -> Fut,
51 Fut: Future<Output = ()>,
[all …]
Dthen.rs14 pub struct Then<St, Fut, F> {
18 future: Option<Fut>,
23 impl<St, Fut, F> fmt::Debug for Then<St, Fut, F>
26 Fut: fmt::Debug,
36 impl<St, Fut, F> Then<St, Fut, F>
38 F: FnMut(St::Item) -> Fut,
51 impl<St, Fut, F> FusedStream for Then<St, Fut, F>
53 F: FnMut(St::Item) -> Fut,
54 Fut: Future,
61 impl<St, Fut, F> Stream for Then<St, Fut, F>
[all …]
Dfilter.rs15 pub struct Filter<St, Fut, F>
22 pending_fut: Option<Fut>,
27 impl<St, Fut, F> fmt::Debug for Filter<St, Fut, F>
31 Fut: fmt::Debug,
43 impl<St, Fut, F> Filter<St, Fut, F>
45 F: for<'a> FnMut1<&'a St::Item, Output=Fut>,
46 Fut: Future<Output = bool>,
60 impl<St, Fut, F> FusedStream for Filter<St, Fut, F>
62 F: FnMut(&St::Item) -> Fut,
63 Fut: Future<Output = bool>,
[all …]
Dskip_while.rs14 pub struct SkipWhile<St, Fut, F> where St: Stream {
19 pending_fut: Option<Fut>,
25 impl<St, Fut, F> fmt::Debug for SkipWhile<St, Fut, F>
29 Fut: fmt::Debug,
41 impl<St, Fut, F> SkipWhile<St, Fut, F>
43 F: FnMut(&St::Item) -> Fut,
44 Fut: Future<Output = bool>,
59 impl<St, Fut, F> FusedStream for SkipWhile<St, Fut, F>
61 F: FnMut(&St::Item) -> Fut,
62 Fut: Future<Output = bool>,
[all …]
Dscan.rs19 pub struct Scan<St: Stream, S, Fut, F> {
24 future: Option<Fut>,
28 impl<St, S, Fut, F> fmt::Debug for Scan<St, S, Fut, F>
33 Fut: fmt::Debug,
45 impl<St: Stream, S, Fut, F> Scan<St, S, Fut, F> {
52 impl<B, St, S, Fut, F> Scan<St, S, Fut, F>
55 F: FnMut(&mut S, St::Item) -> Fut,
56 Fut: Future<Output = Option<B>>,
72 impl<B, St, S, Fut, F> Stream for Scan<St, S, Fut, F>
75 F: FnMut(&mut S, St::Item) -> Fut,
[all …]
/external/rust/crates/futures-util/src/sink/
Dwith.rs14 pub struct With<Si, Item, U, Fut, F> {
19 state: Option<Fut>,
24 impl<Si, Item, U, Fut, F> fmt::Debug for With<Si, Item, U, Fut, F>
27 Fut: fmt::Debug,
37 impl<Si, Item, U, Fut, F> With<Si, Item, U, Fut, F>
39 F: FnMut(U) -> Fut,
40 Fut: Future,
44 Fut: Future<Output = Result<Item, E>>, in new()
56 impl<Si, Item, U, Fut, F> Clone for With<Si, Item, U, Fut, F>
60 Fut: Clone,
[all …]
/external/rust/crates/futures-util/src/stream/try_stream/
Dand_then.rs14 pub struct AndThen<St, Fut, F> {
18 future: Option<Fut>,
23 impl<St, Fut, F> fmt::Debug for AndThen<St, Fut, F>
26 Fut: fmt::Debug,
36 impl<St, Fut, F> AndThen<St, Fut, F>
38 F: FnMut(St::Ok) -> Fut,
39 Fut: TryFuture<Error = St::Error>,
48 impl<St, Fut, F> Stream for AndThen<St, Fut, F>
50 F: FnMut(St::Ok) -> Fut,
51 Fut: TryFuture<Error = St::Error>,
[all …]
Dor_else.rs14 pub struct OrElse<St, Fut, F> {
18 future: Option<Fut>,
23 impl<St, Fut, F> fmt::Debug for OrElse<St, Fut, F>
26 Fut: fmt::Debug,
36 impl<St, Fut, F> OrElse<St, Fut, F>
38 F: FnMut(St::Error) -> Fut,
39 Fut: TryFuture<Ok = St::Ok>,
48 impl<St, Fut, F> Stream for OrElse<St, Fut, F>
50 F: FnMut(St::Error) -> Fut,
51 Fut: TryFuture<Ok = St::Ok>,
[all …]
/external/rust/crates/futures-util/src/stream/
Donce.rs20 pub fn once<Fut: Future>(future: Fut) -> Once<Fut> { in once() argument
21 assert_stream::<Fut::Output, _>(Once::new(future)) in once()
28 pub struct Once<Fut> {
30 future: Option<Fut>
34 impl<Fut> Once<Fut> {
35 pub(crate) fn new(future: Fut) -> Self { in new()
40 impl<Fut: Future> Stream for Once<Fut> {
41 type Item = Fut::Output;
63 impl<Fut: Future> FusedStream for Once<Fut> {
Dunfold.rs50 pub fn unfold<T, F, Fut, Item>(init: T, f: F) -> Unfold<T, F, Fut> in unfold() argument
52 F: FnMut(T) -> Fut, in unfold() argument
53 Fut: Future<Output = Option<(Item, T)>>, in unfold()
64 pub struct Unfold<T, F, Fut> {
67 state: UnfoldState<T, Fut>,
71 impl<T, F, Fut> fmt::Debug for Unfold<T, F, Fut>
74 Fut: fmt::Debug,
83 impl<T, F, Fut, Item> FusedStream for Unfold<T, F, Fut>
85 F: FnMut(T) -> Fut,
86 Fut: Future<Output = Option<(Item, T)>>,
[all …]

1234