Coverage Report

Created: 2026-07-13 08:11

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/rust/registry/src/index.crates.io-1949cf8c6b5b557f/futures-util-0.3.32/src/stream/once.rs
Line
Count
Source
1
use super::assert_stream;
2
use core::pin::Pin;
3
use futures_core::future::Future;
4
use futures_core::ready;
5
use futures_core::stream::{FusedStream, Stream};
6
use futures_core::task::{Context, Poll};
7
use pin_project_lite::pin_project;
8
9
/// Creates a stream of a single element.
10
///
11
/// ```
12
/// # futures::executor::block_on(async {
13
/// use futures::stream::{self, StreamExt};
14
///
15
/// let stream = stream::once(async { 17 });
16
/// let collected = stream.collect::<Vec<i32>>().await;
17
/// assert_eq!(collected, vec![17]);
18
/// # });
19
/// ```
20
108k
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
108k
    assert_stream::<Fut::Output, _>(Once::new(future))
22
108k
}
Unexecuted instantiation: futures_util::stream::once::once::<<alloc::sync::Arc<dyn object_store::ObjectStore> as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}>
futures_util::stream::once::once::<<surrealdb_core::exec::operators::explain::ExplainPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
1
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
1
    assert_stream::<Fut::Output, _>(Once::new(future))
22
1
}
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::foreach::ForeachPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
futures_util::stream::once::once::<<surrealdb_core::exec::operators::sort::full_sort::SortByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
297
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
297
    assert_stream::<Fut::Output, _>(Once::new(future))
22
297
}
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::knn_topk::KnnTopK as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::sort::topk::SortTopK as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::mutate::SingleRowScan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
futures_util::stream::once::once::<<surrealdb_core::exec::operators::current_value_source::CurrentValueSource as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
10
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
10
    assert_stream::<Fut::Output, _>(Once::new(future))
22
10
}
futures_util::stream::once::once::<<surrealdb_core::exec::operators::expr::ExprPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
104k
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
104k
    assert_stream::<Fut::Output, _>(Once::new(future))
22
104k
}
futures_util::stream::once::once::<<surrealdb_core::exec::operators::sleep::SleepPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
3
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
3
    assert_stream::<Fut::Output, _>(Once::new(future))
22
3
}
futures_util::stream::once::once::<<surrealdb_core::exec::operators::ifelse::IfElsePlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
797
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
797
    assert_stream::<Fut::Output, _>(Once::new(future))
22
797
}
futures_util::stream::once::once::<<surrealdb_core::exec::operators::return::ReturnPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
3.15k
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
3.15k
    assert_stream::<Fut::Output, _>(Once::new(future))
22
3.15k
}
futures_util::stream::once::once::<<surrealdb_core::exec::operators::let_plan::LetPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
1
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
1
    assert_stream::<Fut::Output, _>(Once::new(future))
22
1
}
futures_util::stream::once::once::<<surrealdb_core::exec::operators::sequence::SequencePlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
2
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
2
    assert_stream::<Fut::Output, _>(Once::new(future))
22
2
}
futures_util::stream::once::once::<<surrealdb_core::exec::operators::recursion::RecursionOp as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Line
Count
Source
20
10
pub fn once<Fut: Future>(future: Fut) -> Once<Fut> {
21
10
    assert_stream::<Fut::Output, _>(Once::new(future))
22
10
}
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::info::root::RootInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::info::user::UserInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::info::index::IndexInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::info::table::TableInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::info::database::DatabaseInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::info::namespace::NamespaceInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::sort::external_by_key::ExternalSortByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::sort::shuffle::RandomShuffle as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::sort::external::ExternalSort as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::sort::full_sort::Sort as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<surrealdb_core::exec::operators::sort::topk::SortTopKByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<futures_util::future::ready::Ready<core::result::Result<bytes::bytes::Bytes, object_store::Error>>>
Unexecuted instantiation: futures_util::stream::once::once::<<object_store::local::LocalFileSystem as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<<object_store::memory::InMemory as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<object_store::local::chunked_stream::{closure#0}>
Unexecuted instantiation: futures_util::stream::once::once::<_>
23
24
pin_project! {
25
    /// A stream which emits single element and then EOF.
26
    #[derive(Debug)]
27
    #[must_use = "streams do nothing unless polled"]
28
    pub struct Once<Fut> {
29
        #[pin]
30
        future: Option<Fut>
31
    }
32
}
33
34
impl<Fut> Once<Fut> {
35
108k
    pub(crate) fn new(future: Fut) -> Self {
36
108k
        Self { future: Some(future) }
37
108k
    }
Unexecuted instantiation: <futures_util::stream::once::Once<<alloc::sync::Arc<dyn object_store::ObjectStore> as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}>>::new
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::explain::ExplainPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
1
    pub(crate) fn new(future: Fut) -> Self {
36
1
        Self { future: Some(future) }
37
1
    }
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::foreach::ForeachPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::full_sort::SortByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
297
    pub(crate) fn new(future: Fut) -> Self {
36
297
        Self { future: Some(future) }
37
297
    }
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::knn_topk::KnnTopK as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::topk::SortTopK as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::mutate::SingleRowScan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::current_value_source::CurrentValueSource as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
10
    pub(crate) fn new(future: Fut) -> Self {
36
10
        Self { future: Some(future) }
37
10
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::expr::ExprPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
104k
    pub(crate) fn new(future: Fut) -> Self {
36
104k
        Self { future: Some(future) }
37
104k
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::sleep::SleepPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
3
    pub(crate) fn new(future: Fut) -> Self {
36
3
        Self { future: Some(future) }
37
3
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::ifelse::IfElsePlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
797
    pub(crate) fn new(future: Fut) -> Self {
36
797
        Self { future: Some(future) }
37
797
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::return::ReturnPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
3.15k
    pub(crate) fn new(future: Fut) -> Self {
36
3.15k
        Self { future: Some(future) }
37
3.15k
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::let_plan::LetPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
1
    pub(crate) fn new(future: Fut) -> Self {
36
1
        Self { future: Some(future) }
37
1
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::sequence::SequencePlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
2
    pub(crate) fn new(future: Fut) -> Self {
36
2
        Self { future: Some(future) }
37
2
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::recursion::RecursionOp as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Line
Count
Source
35
10
    pub(crate) fn new(future: Fut) -> Self {
36
10
        Self { future: Some(future) }
37
10
    }
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::root::RootInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::user::UserInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::index::IndexInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::table::TableInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::database::DatabaseInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::namespace::NamespaceInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::external_by_key::ExternalSortByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::shuffle::RandomShuffle as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::external::ExternalSort as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::full_sort::Sort as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::topk::SortTopKByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<futures_util::future::ready::Ready<core::result::Result<object_store::ObjectMeta, object_store::Error>>>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<futures_util::future::ready::Ready<core::result::Result<bytes::bytes::Bytes, object_store::Error>>>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<object_store::local::LocalFileSystem as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<<object_store::memory::InMemory as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<object_store::local::chunked_stream::{closure#0}>>::new
Unexecuted instantiation: <futures_util::stream::once::Once<_>>::new
38
}
39
40
impl<Fut: Future> Stream for Once<Fut> {
41
    type Item = Fut::Output;
42
43
193k
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
193k
        let mut this = self.project();
45
193k
        let v = match this.future.as_mut().as_pin_mut() {
46
109k
            Some(fut) => ready!(fut.poll(cx)),
47
83.9k
            None => return Poll::Ready(None),
48
        };
49
50
108k
        this.future.set(None);
51
108k
        Poll::Ready(Some(v))
52
193k
    }
Unexecuted instantiation: <futures_util::stream::once::Once<<alloc::sync::Arc<dyn object_store::ObjectStore> as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}> as futures_core::stream::Stream>::poll_next
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::explain::ExplainPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
2
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
2
        let mut this = self.project();
45
2
        let v = match this.future.as_mut().as_pin_mut() {
46
1
            Some(fut) => ready!(fut.poll(cx)),
47
1
            None => return Poll::Ready(None),
48
        };
49
50
1
        this.future.set(None);
51
1
        Poll::Ready(Some(v))
52
2
    }
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::foreach::ForeachPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::full_sort::SortByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
731
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
731
        let mut this = self.project();
45
731
        let v = match this.future.as_mut().as_pin_mut() {
46
434
            Some(fut) => ready!(fut.poll(cx)),
47
297
            None => return Poll::Ready(None),
48
        };
49
50
297
        this.future.set(None);
51
297
        Poll::Ready(Some(v))
52
731
    }
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::knn_topk::KnnTopK as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::topk::SortTopK as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::mutate::SingleRowScan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::current_value_source::CurrentValueSource as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
20
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
20
        let mut this = self.project();
45
20
        let v = match this.future.as_mut().as_pin_mut() {
46
10
            Some(fut) => ready!(fut.poll(cx)),
47
10
            None => return Poll::Ready(None),
48
        };
49
50
10
        this.future.set(None);
51
10
        Poll::Ready(Some(v))
52
20
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::expr::ExprPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
187k
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
187k
        let mut this = self.project();
45
187k
        let v = match this.future.as_mut().as_pin_mut() {
46
104k
            Some(fut) => ready!(fut.poll(cx)),
47
82.8k
            None => return Poll::Ready(None),
48
        };
49
50
104k
        this.future.set(None);
51
104k
        Poll::Ready(Some(v))
52
187k
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::sleep::SleepPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
7
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
7
        let mut this = self.project();
45
7
        let v = match this.future.as_mut().as_pin_mut() {
46
6
            Some(fut) => ready!(fut.poll(cx)),
47
1
            None => return Poll::Ready(None),
48
        };
49
50
1
        this.future.set(None);
51
1
        Poll::Ready(Some(v))
52
7
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::ifelse::IfElsePlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
1.53k
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
1.53k
        let mut this = self.project();
45
1.53k
        let v = match this.future.as_mut().as_pin_mut() {
46
797
            Some(fut) => ready!(fut.poll(cx)),
47
740
            None => return Poll::Ready(None),
48
        };
49
50
797
        this.future.set(None);
51
797
        Poll::Ready(Some(v))
52
1.53k
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::return::ReturnPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
3.15k
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
3.15k
        let mut this = self.project();
45
3.15k
        let v = match this.future.as_mut().as_pin_mut() {
46
3.15k
            Some(fut) => ready!(fut.poll(cx)),
47
0
            None => return Poll::Ready(None),
48
        };
49
50
3.15k
        this.future.set(None);
51
3.15k
        Poll::Ready(Some(v))
52
3.15k
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::let_plan::LetPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
2
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
2
        let mut this = self.project();
45
2
        let v = match this.future.as_mut().as_pin_mut() {
46
1
            Some(fut) => ready!(fut.poll(cx)),
47
1
            None => return Poll::Ready(None),
48
        };
49
50
1
        this.future.set(None);
51
1
        Poll::Ready(Some(v))
52
2
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::sequence::SequencePlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
2
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
2
        let mut this = self.project();
45
2
        let v = match this.future.as_mut().as_pin_mut() {
46
2
            Some(fut) => ready!(fut.poll(cx)),
47
0
            None => return Poll::Ready(None),
48
        };
49
50
2
        this.future.set(None);
51
2
        Poll::Ready(Some(v))
52
2
    }
<futures_util::stream::once::Once<<surrealdb_core::exec::operators::recursion::RecursionOp as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Line
Count
Source
43
20
    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
44
20
        let mut this = self.project();
45
20
        let v = match this.future.as_mut().as_pin_mut() {
46
10
            Some(fut) => ready!(fut.poll(cx)),
47
10
            None => return Poll::Ready(None),
48
        };
49
50
10
        this.future.set(None);
51
10
        Poll::Ready(Some(v))
52
20
    }
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::root::RootInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::user::UserInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::index::IndexInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::table::TableInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::database::DatabaseInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::namespace::NamespaceInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::external_by_key::ExternalSortByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::shuffle::RandomShuffle as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::external::ExternalSort as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::full_sort::Sort as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::topk::SortTopKByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<futures_util::future::ready::Ready<core::result::Result<object_store::ObjectMeta, object_store::Error>>> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<futures_util::future::ready::Ready<core::result::Result<bytes::bytes::Bytes, object_store::Error>>> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<object_store::local::LocalFileSystem as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<<object_store::memory::InMemory as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<object_store::local::chunked_stream::{closure#0}> as futures_core::stream::Stream>::poll_next
Unexecuted instantiation: <futures_util::stream::once::Once<_> as futures_core::stream::Stream>::poll_next
53
54
0
    fn size_hint(&self) -> (usize, Option<usize>) {
55
0
        if self.future.is_some() {
56
0
            (1, Some(1))
57
        } else {
58
0
            (0, Some(0))
59
        }
60
0
    }
Unexecuted instantiation: <futures_util::stream::once::Once<<alloc::sync::Arc<dyn object_store::ObjectStore> as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::explain::ExplainPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::foreach::ForeachPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::full_sort::SortByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::knn_topk::KnnTopK as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::topk::SortTopK as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::mutate::SingleRowScan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::current_value_source::CurrentValueSource as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::expr::ExprPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sleep::SleepPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::ifelse::IfElsePlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::return::ReturnPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::let_plan::LetPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sequence::SequencePlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::recursion::RecursionOp as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::root::RootInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::user::UserInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::index::IndexInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::table::TableInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::database::DatabaseInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::info::namespace::NamespaceInfoPlan as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::external_by_key::ExternalSortByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::shuffle::RandomShuffle as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::external::ExternalSort as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::full_sort::Sort as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<surrealdb_core::exec::operators::sort::topk::SortTopKByKey as surrealdb_core::exec::ExecOperator>::execute::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<futures_util::future::ready::Ready<core::result::Result<object_store::ObjectMeta, object_store::Error>>> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<futures_util::future::ready::Ready<core::result::Result<bytes::bytes::Bytes, object_store::Error>>> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<object_store::local::LocalFileSystem as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<<object_store::memory::InMemory as object_store::ObjectStoreExt>::delete::{closure#0}::{closure#0}> as futures_core::stream::Stream>::size_hint
Unexecuted instantiation: <futures_util::stream::once::Once<_> as futures_core::stream::Stream>::size_hint
61
}
62
63
impl<Fut: Future> FusedStream for Once<Fut> {
64
0
    fn is_terminated(&self) -> bool {
65
0
        self.future.is_none()
66
0
    }
67
}