pub struct Timeout {
pub duration: Duration,
}Expand description
Timeout interceptor.
Wraps the operation with a timeout. If the timeout expires, returns
an error via Timeoutable.
§Example
ⓘ
use llm_stack::intercept::{InterceptorStack, Timeout, ToolExec};
use std::time::Duration;
let stack = InterceptorStack::<ToolExec<()>>::new()
.with(Timeout::new(Duration::from_secs(30)));Fields§
§duration: DurationMaximum duration for the operation.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Timeout
impl RefUnwindSafe for Timeout
impl Send for Timeout
impl Sync for Timeout
impl Unpin for Timeout
impl UnwindSafe for Timeout
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