pub struct TextSearchRequest {
pub mode: TextCandidateMode,
pub query: String,
pub language: Option<String>,
pub limit: u64,
}Expand description
One candidate drain request.
Fields§
§mode: TextCandidateModeWhich query to build.
query: StringFull-text query string, or the literal prefix / suffix pattern.
language: Option<String>Optional language restriction (lang:fr, or the _none sentinel).
limit: u64Per-drain guard on emitted distinct terms; 0 means unlimited.
This is an execution guard, not a cursor: exceeding it is an error, not a silent truncation, because dropped candidates would drop rows.
NO v1 caller arms a guard: every minted request carries 0, so a
drain is unbounded — a broad FTS query materializes its whole
distinct candidate set in one partition-side allocation. Arming a
real limit requires a policy for the error reaching the client
(refine-the-query is not always actionable), so until then the
unbounded drain is the documented contract, not an oversight.
Implementations§
Source§impl TextSearchRequest
impl TextSearchRequest
Sourcepub fn fts(query: impl Into<String>) -> TextSearchRequest
pub fn fts(query: impl Into<String>) -> TextSearchRequest
A full-text request.
Sourcepub fn prefix(pattern: impl Into<String>) -> TextSearchRequest
pub fn prefix(pattern: impl Into<String>) -> TextSearchRequest
A prefix request.
Sourcepub fn suffix(pattern: impl Into<String>) -> TextSearchRequest
pub fn suffix(pattern: impl Into<String>) -> TextSearchRequest
A suffix request.
Trait Implementations§
Source§impl Clone for TextSearchRequest
impl Clone for TextSearchRequest
Source§fn clone(&self) -> TextSearchRequest
fn clone(&self) -> TextSearchRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextSearchRequest
impl Debug for TextSearchRequest
Source§impl Hash for TextSearchRequest
impl Hash for TextSearchRequest
Source§impl PartialEq for TextSearchRequest
impl PartialEq for TextSearchRequest
impl Eq for TextSearchRequest
impl StructuralPartialEq for TextSearchRequest
Auto Trait Implementations§
impl Freeze for TextSearchRequest
impl RefUnwindSafe for TextSearchRequest
impl Send for TextSearchRequest
impl Sync for TextSearchRequest
impl Unpin for TextSearchRequest
impl UnsafeUnpin for TextSearchRequest
impl UnwindSafe for TextSearchRequest
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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