pub struct TruncateText {
pub max_bytes: usize,
}Expand description
Cap a result’s length, saying so where it was cut.
Not registered by default: the engine imposes no cap of its own here, and silently shortening a result is exactly the kind of thing that should be a deployment’s decision rather than a default nobody was told about.
Fields§
§max_bytes: usizeTrait Implementations§
Source§impl ToolResultTransformer for TruncateText
impl ToolResultTransformer for TruncateText
fn transform(&self, _call: &ToolCall, draft: &mut ToolResultDraft)
Auto Trait Implementations§
impl Forget for TruncateText
impl Freeze for TruncateText
impl Move for TruncateText
impl RefUnwindSafe for TruncateText
impl Send for TruncateText
impl Sync for TruncateText
impl Unpin for TruncateText
impl UnsafeUnpin for TruncateText
impl UnwindSafe for TruncateText
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