Skip to main content

BTreeFieldValuesFilter

Struct BTreeFieldValuesFilter 

Source
pub struct BTreeFieldValuesFilter<F, VF, V>
where F: Field, VF: ValueFilter<V>,
{ pub fields: BTreeMap<F, VF>, pub mode: MatchingMode, /* private fields */ }

Fields§

§fields: BTreeMap<F, VF>

Field-value filters to match against.

§mode: MatchingMode

Field filter matching mode.

Implementations§

Source§

impl<F, VF, V> BTreeFieldValuesFilter<F, VF, V>
where F: Field, VF: ValueFilter<V>,

Source

pub fn builder() -> BTreeFieldValuesFilterBuilder<F, VF, V>

Create an instance of BTreeFieldValuesFilter using the builder syntax

Trait Implementations§

Source§

impl<F, VF, V: Clone> Clone for BTreeFieldValuesFilter<F, VF, V>
where F: Field + Clone, VF: ValueFilter<V> + Clone,

Source§

fn clone(&self) -> BTreeFieldValuesFilter<F, VF, V>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<F, VF, V: Debug> Debug for BTreeFieldValuesFilter<F, VF, V>
where F: Field + Debug, VF: ValueFilter<V> + Debug,

Source§

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

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

impl<F: Field, VF: ValueFilter<V>, V> Default for BTreeFieldValuesFilter<F, VF, V>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de, F, VF, V> Deserialize<'de> for BTreeFieldValuesFilter<F, VF, V>
where F: Field + Deserialize<'de>, VF: ValueFilter<V> + Deserialize<'de>, BTreeFieldValuesFilter<F, VF, V>: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<F: Field, VF: ValueFilter<V>, V> FieldValuesFilter<F, V> for BTreeFieldValuesFilter<F, VF, V>

Source§

fn matching_mode(&self) -> &MatchingMode

Matching mode that determines how to match the field values.
Source§

fn match_one(&self, field: &F, value: &V) -> bool

Match one field value against this filter.
Source§

fn max_matches(&self) -> usize

Maximum number of fields to match.
Source§

fn matches<'a, I: Iterator<Item = (&'a F, &'a V)>>(&'a self, items: I) -> bool
where F: 'a, V: 'a,

Whether the given field and value satisfy this filter.
Source§

fn match_all<'a, I: Iterator<Item = (&'a F, &'a V)>>(&'a self, items: I) -> bool
where F: 'a, V: 'a,

Check whether all filtering fields are a match.
Source§

fn match_any<'a, I: Iterator<Item = (&'a F, &'a V)>>(&'a self, items: I) -> bool
where F: 'a, V: 'a,

Match any one field of the filter.
Source§

fn match_none<'a, I: Iterator<Item = (&'a F, &'a V)>>( &'a self, items: I, ) -> bool
where F: 'a, V: 'a,

Match none of the filter’s fields.
Source§

impl<F: Field, V> From<BTreeFieldsFilter<F>> for BTreeFieldValuesFilter<F, (), V>

Source§

fn from(value: BTreeFieldsFilter<F>) -> Self

Converts to this type from the input type.
Source§

impl<N, K, L, W, WV, A, AV> MetadataFilter<BTreeFieldsFilter<Uuid>, BTreeFieldsFilter<N>, BTreeFieldsFilter<K>, BTreeFieldsFilter<L>, BTreeFieldValuesFilter<W, Domain1D<WV>, WV>, BTreeFieldValuesFilter<A, (), AV>, N, K, L, W, WV, A, AV> for BTreeMetadataFilter<N, K, L, W, WV, A, AV>
where N: Field, K: Field, L: Field, W: Field, WV: WeightValue, A: Field, AV: AnnotationValue,

Source§

fn id_filters<'a>(&'a self) -> impl Iterator<Item = &'a BTreeFieldsFilter<Uuid>>

Filters by ID.
Source§

fn name_filters<'a>(&'a self) -> impl Iterator<Item = &'a BTreeFieldsFilter<N>>
where BTreeFieldsFilter<N>: 'a,

Filters by name.
Source§

fn kind_filters<'a>(&'a self) -> impl Iterator<Item = &'a BTreeFieldsFilter<K>>
where BTreeFieldsFilter<K>: 'a,

Filters by kind.
Source§

fn label_filters<'a>(&'a self) -> impl Iterator<Item = &'a BTreeFieldsFilter<L>>
where BTreeFieldsFilter<L>: 'a,

Filters by label.
Source§

fn weight_filters<'a>( &'a self, ) -> impl Iterator<Item = &'a BTreeFieldValuesFilter<W, Domain1D<WV>, WV>>
where BTreeFieldValuesFilter<W, Domain1D<WV>, WV>: 'a,

Filters by weight.
Source§

fn annotation_filters<'a>( &'a self, ) -> impl Iterator<Item = &'a BTreeFieldValuesFilter<A, (), AV>>
where BTreeFieldsFilter<A>: 'a,

Filters by annotation.
Source§

fn matches_metadata<'a, M: ReadMetadata<'a, N, K, L, W, WV, A, AV>>( &'a self, meta: &'a M, ) -> bool
where N: 'a, K: 'a, L: 'a, W: 'a, WV: 'a, A: 'a, AV: 'a, LF: 'a, WF: 'a, AF: 'a,

Return whether this metadata filter matches the given metadata.
Source§

impl<F, VF, V: PartialEq> PartialEq for BTreeFieldValuesFilter<F, VF, V>
where F: Field + PartialEq, VF: ValueFilter<V> + PartialEq,

Source§

fn eq(&self, other: &BTreeFieldValuesFilter<F, VF, V>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<F, VF, V> Serialize for BTreeFieldValuesFilter<F, VF, V>
where F: Field + Serialize, VF: ValueFilter<V> + Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<F, VF, V> StructuralPartialEq for BTreeFieldValuesFilter<F, VF, V>
where F: Field, VF: ValueFilter<V>,

Auto Trait Implementations§

§

impl<F, VF, V> Freeze for BTreeFieldValuesFilter<F, VF, V>

§

impl<F, VF, V> RefUnwindSafe for BTreeFieldValuesFilter<F, VF, V>

§

impl<F, VF, V> Send for BTreeFieldValuesFilter<F, VF, V>
where V: Send, F: Send, VF: Send,

§

impl<F, VF, V> Sync for BTreeFieldValuesFilter<F, VF, V>
where V: Sync, F: Sync, VF: Sync,

§

impl<F, VF, V> Unpin for BTreeFieldValuesFilter<F, VF, V>
where V: Unpin,

§

impl<F, VF, V> UnsafeUnpin for BTreeFieldValuesFilter<F, VF, V>

§

impl<F, VF, V> UnwindSafe for BTreeFieldValuesFilter<F, VF, V>

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> 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> 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, 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<T> AnnotationValue for T
where T: Debug + Clone + PartialEq,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,