use async_trait::async_trait;
use super::{PageResult, PipelineContext, PipelineNode, PipelineNodeState};
pub(crate) struct DrainedLeaf;
#[async_trait]
impl PipelineNode for DrainedLeaf {
async fn next_page(
&mut self,
_context: &mut PipelineContext<'_>,
) -> crate::error::Result<PageResult> {
Ok(PageResult::Drained)
}
#[cfg(test)]
fn into_children(self) -> Vec<Box<dyn PipelineNode>> {
Vec::new()
}
fn snapshot_state(&self) -> crate::error::Result<PipelineNodeState> {
Ok(PipelineNodeState::Drained)
}
fn topology_can_change(&self) -> bool {
false
}
}