pub struct Filter(/* private fields */);Expand description
A parsed feature filter.
Implementations§
Source§impl Filter
impl Filter
Sourcepub fn new(tree: JsonTree, with_geometry: bool) -> Result<Filter>
pub fn new(tree: JsonTree, with_geometry: bool) -> Result<Filter>
The filter tree. with_geometry says whether its features will have
their geometry, which intersects needs: only overzoom’s do.
Sourcepub fn evaluate(
&self,
feature: &HashMap<String, MvtValue>,
layer: &str,
exclude_attributes: &mut BTreeSet<String>,
unidecode_data: &[String],
) -> bool
pub fn evaluate( &self, feature: &HashMap<String, MvtValue>, layer: &str, exclude_attributes: &mut BTreeSet<String>, unidecode_data: &[String], ) -> bool
tippecanoe-rs’s evaluate: whether the feature with the attributes
feature in layer passes.
Sourcepub fn evaluate_feature(
&self,
feat: &MvtFeature,
layer: &MvtLayer,
exclude_attributes: &mut BTreeSet<String>,
z: i32,
unidecode_data: &[String],
geom: Option<&FilterGeometry<'_>>,
) -> bool
pub fn evaluate_feature( &self, feat: &MvtFeature, layer: &MvtLayer, exclude_attributes: &mut BTreeSet<String>, z: i32, unidecode_data: &[String], geom: Option<&FilterGeometry<'_>>, ) -> bool
tippecanoe-rs’s evaluate_feature, with the feature’s geometry for
intersects.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Filter
impl Freeze for Filter
impl Move for Filter
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnsafeUnpin for Filter
impl UnwindSafe for Filter
Blanket Implementations§
impl<T> Allocation for T
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
Mutably borrows from an owned value. Read more
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,
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> ⓘ
Converts
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> ⓘ
Converts
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