pub enum FilterConfig {
Range {
params: RangeParams,
},
List {
params: ListParams,
},
Point2D {
params: Point2DParams,
},
Point3D {
params: Point3DParams,
},
}Expand description
All supported filter configurations.
§Examples
use nc2parquet::input::{FilterConfig, RangeParams};
let filter = FilterConfig::Range {
params: RangeParams {
dimension_name: "latitude".to_string(),
min_value: -10.0,
max_value: 10.0,
},
};
assert_eq!(filter.kind(), "range");Variants§
Range
Range filter — selects dimension values within [min_value, max_value].
Fields
params: RangeParamsRange filter parameters (dimension name and bounds).
List
List filter — selects only the discrete dimension values listed in params.
Fields
params: ListParamsList filter parameters (dimension name and allowed values).
Point2D
2D spatial point filter — selects grid cells within tolerance of the
specified (latitude, longitude) points.
Fields
params: Point2DParams2D point filter parameters (dimension names, points, tolerance).
Point3D
3D spatiotemporal point filter — selects grid cells that match both the specified time steps and the spatial (lat, lon) points within tolerance.
Fields
params: Point3DParams3D point filter parameters (dimension names, time steps, points, tolerance).
Implementations§
Source§impl FilterConfig
impl FilterConfig
Sourcepub fn to_filter(&self) -> Result<Box<dyn NCFilter>, Nc2ParquetError>
pub fn to_filter(&self) -> Result<Box<dyn NCFilter>, Nc2ParquetError>
Converts this filter configuration into a concrete filter implementation.
Sourcepub fn kind(&self) -> &'static str
pub fn kind(&self) -> &'static str
Returns the string identifier for this filter type.
§Examples
use nc2parquet::input::{FilterConfig, RangeParams, ListParams};
let range_filter = FilterConfig::Range {
params: RangeParams {
dimension_name: "latitude".to_string(),
min_value: 0.0,
max_value: 90.0,
},
};
assert_eq!(range_filter.kind(), "range");
let list_filter = FilterConfig::List {
params: ListParams {
dimension_name: "pressure".to_string(),
values: vec![1000.0, 850.0],
},
};
assert_eq!(list_filter.kind(), "list");Trait Implementations§
Source§impl Clone for FilterConfig
impl Clone for FilterConfig
Source§fn clone(&self) -> FilterConfig
fn clone(&self) -> FilterConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FilterConfig
impl Debug for FilterConfig
Source§impl<'de> Deserialize<'de> for FilterConfig
impl<'de> Deserialize<'de> for FilterConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<ListFilterArg> for FilterConfig
impl From<ListFilterArg> for FilterConfig
Source§fn from(arg: ListFilterArg) -> Self
fn from(arg: ListFilterArg) -> Self
Source§impl From<Point2DFilterArg> for FilterConfig
impl From<Point2DFilterArg> for FilterConfig
Source§fn from(arg: Point2DFilterArg) -> Self
fn from(arg: Point2DFilterArg) -> Self
Source§impl From<Point3DFilterArg> for FilterConfig
impl From<Point3DFilterArg> for FilterConfig
Source§fn from(arg: Point3DFilterArg) -> Self
fn from(arg: Point3DFilterArg) -> Self
Source§impl From<RangeFilterArg> for FilterConfig
impl From<RangeFilterArg> for FilterConfig
Source§fn from(arg: RangeFilterArg) -> Self
fn from(arg: RangeFilterArg) -> Self
Auto Trait Implementations§
impl Freeze for FilterConfig
impl RefUnwindSafe for FilterConfig
impl Send for FilterConfig
impl Sync for FilterConfig
impl Unpin for FilterConfig
impl UnsafeUnpin for FilterConfig
impl UnwindSafe for FilterConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more