pub struct MemvidFilter {
pub uri: Option<String>,
pub scope: Option<String>,
pub as_of_frame: Option<u64>,
pub as_of_ts: Option<i64>,
pub cursor: Option<String>,
pub no_sketch: Option<bool>,
/* private fields */
}Expand description
A filter clause supported by MemvidStore.
Memvid’s query model does not support arbitrary boolean predicates;
this filter only carries the restriction parameters that map onto
fields of SearchRequest:
| Predicate | Effect on the search request |
|---|---|
eq("uri", "...") | request.uri = Some(value) |
eq("scope", "...") | request.scope = Some(value) |
eq("as_of_frame", n) | request.as_of_frame |
eq("as_of_ts", n) | request.as_of_ts |
eq("cursor", "...") | request.cursor (pagination) |
eq("no_sketch", true/false) | disable sketch pre-filtering |
gt, lt, and or are not representable; constructing such a filter
produces an error at query time
(MemvidError::UnsupportedFilter).
Fields§
§uri: Option<String>Optional URI prefix restriction.
scope: Option<String>Optional logical scope.
as_of_frame: Option<u64>Optional point-in-time frame id.
as_of_ts: Option<i64>Optional point-in-time unix-millis timestamp.
cursor: Option<String>Optional pagination cursor (opaque token returned by a prior search).
no_sketch: Option<bool>If Some(true), disable the sketch pre-filter for this query.
Implementations§
Source§impl MemvidFilter
impl MemvidFilter
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns true when this filter has no recorded validity
problems. Filters with is_valid() == false are rejected by
the search path with MemvidError::UnsupportedFilter.
Callers that build a MemvidFilter programmatically (for
example through Rig’s SearchFilter combinators) can use this
pair with MemvidFilter::errors to surface the failure
before issuing the query.
Sourcepub fn errors(&self) -> &[String]
pub fn errors(&self) -> &[String]
Human-readable reasons why this filter cannot be applied, or
an empty slice when MemvidFilter::is_valid returns true.
Trait Implementations§
Source§impl Clone for MemvidFilter
impl Clone for MemvidFilter
Source§fn clone(&self) -> MemvidFilter
fn clone(&self) -> MemvidFilter
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 MemvidFilter
impl Debug for MemvidFilter
Source§impl Default for MemvidFilter
impl Default for MemvidFilter
Source§fn default() -> MemvidFilter
fn default() -> MemvidFilter
Source§impl<'de> Deserialize<'de> for MemvidFilter
impl<'de> Deserialize<'de> for MemvidFilter
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 SearchFilter for MemvidFilter
impl SearchFilter for MemvidFilter
Auto Trait Implementations§
impl Freeze for MemvidFilter
impl RefUnwindSafe for MemvidFilter
impl Send for MemvidFilter
impl Sync for MemvidFilter
impl Unpin for MemvidFilter
impl UnsafeUnpin for MemvidFilter
impl UnwindSafe for MemvidFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> 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