Skip to main content

WithinFilter

Struct WithinFilter 

Source
pub struct WithinFilter { /* private fields */ }
Expand description

Filter that finds geometries contained within a given geometry.

A stored geometry matches if it is completely contained within the search geometry.

Implementations§

Source§

impl WithinFilter

Source

pub fn new(field: impl Into<String>, geometry: Geometry) -> Self

Creates a new within filter.

Trait Implementations§

Source§

impl Clone for WithinFilter

Source§

fn clone(&self) -> WithinFilter

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Display for WithinFilter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FilterProvider for WithinFilter

Source§

fn apply(&self, entry: &Document) -> NitriteResult<bool>

Applies the filter to a document and returns whether it matches. Read more
Source§

fn has_field(&self) -> bool

Checks if this filter operates on a specific field.
Source§

fn get_field_name(&self) -> NitriteResult<String>

Gets the field name this filter operates on. Read more
Source§

fn set_field_name(&self, field_name: String) -> NitriteResult<()>

Sets the field name for this filter.
Source§

fn is_index_only_filter(&self) -> bool

Checks if this filter can be satisfied by index lookup alone.
Source§

fn supported_index_type(&self) -> NitriteResult<String>

Gets the index type that this filter supports.
Source§

fn can_be_grouped(&self, other: Filter) -> NitriteResult<bool>

Source§

fn as_any(&self) -> &dyn Any

Source§

fn apply_on_index( &self, _index_map: &IndexMap, ) -> Result<Vec<Value>, NitriteError>

Applies the filter using an index map for optimized scanning. Read more
Source§

fn get_collection_name(&self) -> Result<String, NitriteError>

Gets the associated collection name for this filter. Read more
Source§

fn set_collection_name( &self, _collection_name: String, ) -> Result<(), NitriteError>

Sets the collection name for this filter. Read more
Source§

fn get_field_value(&self) -> Result<Option<Value>, NitriteError>

Gets the field value this filter operates on.
Source§

fn set_field_value(&self, _field_value: Value) -> Result<(), NitriteError>

Sets the field value for this filter.
Source§

fn get_reverse_scan(&self) -> Result<bool, NitriteError>

Gets whether reverse scanning is enabled.
Source§

fn set_reverse_scan(&self, _reverse_scan: bool) -> Result<(), NitriteError>

Sets whether to use reverse scanning.
Source§

fn is_reverse_scan_supported(&self) -> bool

Checks if this filter supports reverse scanning through indexes.
Source§

fn process_index_value( &self, value: Option<Value>, sub_map: &mut Vec<Value>, nitrite_ids: &mut Vec<Value>, )

Source§

fn validate_array_search_term( &self, field: String, value: &Value, ) -> Result<(), NitriteError>

Source§

fn logical_filters(&self) -> Result<Vec<Filter>, NitriteError>

Source§

impl SpatialFilterOps for WithinFilter

Source§

fn geometry(&self) -> &Geometry

Gets the search geometry.
Source§

fn matches_geometry(&self, stored: &Geometry) -> bool

Performs the precise geometry match (Phase 2). Returns true if the stored geometry matches the filter criteria.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V