pub struct OptionPolicy {
pub supported_invocation: BTreeSet<ConfigOption>,
pub session_immutable: BTreeSet<ConfigOption>,
pub allowed_extension_keys: BTreeSet<ExtensionKey>,
}Expand description
Which options a Channel accepts and which are immutable once a session exists.
Fields§
§supported_invocation: BTreeSet<ConfigOption>Options callers may set on invocation.
session_immutable: BTreeSet<ConfigOption>Options frozen for an existing external session (must match or fail).
allowed_extension_keys: BTreeSet<ExtensionKey>Allowed extension key namespaces (exact keys). Empty means no extensions permitted (D-023).
Implementations§
Source§impl OptionPolicy
impl OptionPolicy
Sourcepub fn direct_llm() -> Self
pub fn direct_llm() -> Self
Direct-LLM Channel: typed invocation options open; no extensions by default.
Sourcepub fn external_agent() -> Self
pub fn external_agent() -> Self
External-agent Channel: session/continuation focused; no model temperature by default.
Sourcepub fn with_extension_keys(
self,
keys: impl IntoIterator<Item = ExtensionKey>,
) -> Self
pub fn with_extension_keys( self, keys: impl IntoIterator<Item = ExtensionKey>, ) -> Self
Permit exact extension keys (still requires ConfigOption::Extensions supported).
Trait Implementations§
Source§impl Clone for OptionPolicy
impl Clone for OptionPolicy
Source§fn clone(&self) -> OptionPolicy
fn clone(&self) -> OptionPolicy
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 OptionPolicy
impl Debug for OptionPolicy
Source§impl Default for OptionPolicy
impl Default for OptionPolicy
Source§fn default() -> OptionPolicy
fn default() -> OptionPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OptionPolicy
impl<'de> Deserialize<'de> for OptionPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OptionPolicy
Source§impl PartialEq for OptionPolicy
impl PartialEq for OptionPolicy
Source§impl Serialize for OptionPolicy
impl Serialize for OptionPolicy
impl StructuralPartialEq for OptionPolicy
Auto Trait Implementations§
impl Freeze for OptionPolicy
impl RefUnwindSafe for OptionPolicy
impl Send for OptionPolicy
impl Sync for OptionPolicy
impl Unpin for OptionPolicy
impl UnsafeUnpin for OptionPolicy
impl UnwindSafe for OptionPolicy
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