pub struct RetrievalPlan {
pub query: String,
pub source_scope: Option<String>,
pub limit: usize,
pub freshness: FreshnessPolicy,
}Expand description
Validated retrieval request with bounded result count.
Fields§
§query: String§source_scope: Option<String>§limit: usize§freshness: FreshnessPolicyImplementations§
Source§impl RetrievalPlan
impl RetrievalPlan
Sourcepub fn new(
query: impl Into<String>,
source_scope: Option<String>,
limit: usize,
freshness: FreshnessPolicy,
) -> Result<Self, RetrievalPlanError>
pub fn new( query: impl Into<String>, source_scope: Option<String>, limit: usize, freshness: FreshnessPolicy, ) -> Result<Self, RetrievalPlanError>
Validates query text and result limits.
Trait Implementations§
Source§impl Clone for RetrievalPlan
impl Clone for RetrievalPlan
Source§fn clone(&self) -> RetrievalPlan
fn clone(&self) -> RetrievalPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetrievalPlan
impl Debug for RetrievalPlan
impl Eq for RetrievalPlan
Source§impl PartialEq for RetrievalPlan
impl PartialEq for RetrievalPlan
Source§fn eq(&self, other: &RetrievalPlan) -> bool
fn eq(&self, other: &RetrievalPlan) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RetrievalPlan
Auto Trait Implementations§
impl Freeze for RetrievalPlan
impl RefUnwindSafe for RetrievalPlan
impl Send for RetrievalPlan
impl Sync for RetrievalPlan
impl Unpin for RetrievalPlan
impl UnsafeUnpin for RetrievalPlan
impl UnwindSafe for RetrievalPlan
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.