pub enum ScopingPolicy {
None,
ClientPrefix(PromptTemplate),
RequireServerPromptName,
RequireInternal,
}Expand description
Declarative scoping/prompt policy for a text embedder call site.
This is intentionally small: it exists to prevent the two most common regression classes:
- double prompting (client prefix + server/internal prompt)
- silent mode ignore (caller thinks Query/Document scope matters, but backend ignores it)
Variants§
None
No scoping/prompting beyond what the backend does by default.
ClientPrefix(PromptTemplate)
Apply a client-side prefix template based on EmbedMode.
RequireServerPromptName
Require that the backend applies scope via server-side prompt selection (e.g. TEI prompt_name).
RequireInternal
Require that the backend applies scope internally (e.g. local embedder with per-mode prompt fields).
Trait Implementations§
Source§impl Clone for ScopingPolicy
impl Clone for ScopingPolicy
Source§fn clone(&self) -> ScopingPolicy
fn clone(&self) -> ScopingPolicy
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 moreAuto Trait Implementations§
impl Freeze for ScopingPolicy
impl RefUnwindSafe for ScopingPolicy
impl Send for ScopingPolicy
impl Sync for ScopingPolicy
impl Unpin for ScopingPolicy
impl UnsafeUnpin for ScopingPolicy
impl UnwindSafe for ScopingPolicy
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