pub struct SuggestQuery {
pub category: Option<SuggestCategory>,
pub max_safety: Option<SafetyLevel>,
pub min_confidence: Option<f32>,
pub target_symbols: Option<Vec<SymbolId>>,
pub limit: Option<usize>,
}Expand description
Query filter for suggestions
Fields§
§category: Option<SuggestCategory>Filter by category
max_safety: Option<SafetyLevel>Filter by safety level (max level to include)
min_confidence: Option<f32>Filter by minimum confidence
target_symbols: Option<Vec<SymbolId>>Filter by target symbols (any of these)
limit: Option<usize>Limit results
Implementations§
Source§impl SuggestQuery
impl SuggestQuery
Sourcepub fn with_category(self, category: SuggestCategory) -> Self
pub fn with_category(self, category: SuggestCategory) -> Self
Filter by category
Sourcepub fn with_max_safety(self, safety: SafetyLevel) -> Self
pub fn with_max_safety(self, safety: SafetyLevel) -> Self
Filter by maximum safety level
Sourcepub fn with_min_confidence(self, confidence: f32) -> Self
pub fn with_min_confidence(self, confidence: f32) -> Self
Filter by minimum confidence
Sourcepub fn with_targets(self, symbols: Vec<SymbolId>) -> Self
pub fn with_targets(self, symbols: Vec<SymbolId>) -> Self
Filter by target symbols
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Limit number of results
Trait Implementations§
Source§impl Clone for SuggestQuery
impl Clone for SuggestQuery
Source§fn clone(&self) -> SuggestQuery
fn clone(&self) -> SuggestQuery
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 SuggestQuery
impl Debug for SuggestQuery
Source§impl Default for SuggestQuery
impl Default for SuggestQuery
Source§fn default() -> SuggestQuery
fn default() -> SuggestQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SuggestQuery
impl RefUnwindSafe for SuggestQuery
impl Send for SuggestQuery
impl Sync for SuggestQuery
impl Unpin for SuggestQuery
impl UnsafeUnpin for SuggestQuery
impl UnwindSafe for SuggestQuery
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<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>
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 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>
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