pub struct PlacementOptions {
pub search_limit: usize,
pub search_threshold: f32,
pub max_imports: usize,
pub query_embedding: Option<Embedding>,
}Expand description
Options for customizing placement suggestion behavior.
Fields§
§search_limit: usizeNumber of search results to retrieve (default: 10)
search_threshold: f32Minimum search score threshold (default: 0.1)
max_imports: usizeMaximum number of imports to extract per file (default: 5)
query_embedding: Option<Embedding>Pre-computed query embedding (avoids redundant ONNX inference when the
caller already embedded the query, e.g. task() embeds once and reuses).
When None, the embedding is computed from the description.
Trait Implementations§
Source§impl Clone for PlacementOptions
impl Clone for PlacementOptions
Source§fn clone(&self) -> PlacementOptions
fn clone(&self) -> PlacementOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 PlacementOptions
impl Debug for PlacementOptions
Source§impl Default for PlacementOptions
impl Default for PlacementOptions
Source§fn default() -> Self
fn default() -> Self
Creates a new instance with default configuration values for placement search parameters.
§Returns
A new Self instance with search_limit set to DEFAULT_PLACEMENT_SEARCH_LIMIT, search_threshold set to DEFAULT_PLACEMENT_SEARCH_THRESHOLD, max_imports set to MAX_IMPORT_COUNT, and query_embedding set to None.
Auto Trait Implementations§
impl Freeze for PlacementOptions
impl RefUnwindSafe for PlacementOptions
impl Send for PlacementOptions
impl Sync for PlacementOptions
impl Unpin for PlacementOptions
impl UnsafeUnpin for PlacementOptions
impl UnwindSafe for PlacementOptions
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