use vortex::layout::scan::scan_builder::ScanBuilder;
use vortex::scan::selection::Selection;
#[derive(Default)]
pub struct VortexAccessPlan {
selection: Option<Selection>,
}
impl VortexAccessPlan {
pub fn with_selection(mut self, selection: Selection) -> Self {
self.selection = Some(selection);
self
}
}
impl VortexAccessPlan {
pub fn selection(&self) -> Option<&Selection> {
self.selection.as_ref()
}
pub fn apply_to_builder<A>(&self, mut scan_builder: ScanBuilder<A>) -> ScanBuilder<A>
where
A: 'static + Send,
{
let Self { selection } = self;
if let Some(selection) = selection {
scan_builder = scan_builder.with_selection(selection.clone());
}
scan_builder
}
}