pub enum BodyCodec {
Json,
FunctionXml,
}Expand description
How a tool-call body is encoded between the envelope markers.
Codec internals (key names, inner XML markers) are properties of the codec itself, invariant across models that use it, and live in the parser — a spec only selects which codecs apply and in what order.
Variants§
Json
A {"name": ..., "arguments": {...}} JSON object (Qwen 2/2.5,
Hermes, and most template-derived dialects).
FunctionXml
One or more <function=NAME><parameter=KEY>VALUE</parameter>...
blocks (Qwen 3 under --jinja, Hermes-style).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BodyCodec
impl<'de> Deserialize<'de> for BodyCodec
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 Copy for BodyCodec
impl Eq for BodyCodec
impl StructuralPartialEq for BodyCodec
Auto Trait Implementations§
impl Freeze for BodyCodec
impl RefUnwindSafe for BodyCodec
impl Send for BodyCodec
impl Sync for BodyCodec
impl Unpin for BodyCodec
impl UnsafeUnpin for BodyCodec
impl UnwindSafe for BodyCodec
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