pub struct Limits {
pub max_message_bytes: usize,
pub max_json_depth: usize,
pub tool_timeout: Duration,
pub max_concurrent_calls: usize,
}Expand description
Resource limits applied to every request.
The defaults are deliberately conservative. Every value can be changed
through the ServerBuilder.
Fields§
§max_message_bytes: usizeMaximum size of one JSON-RPC message in bytes (HTTP body or stdio line).
max_json_depth: usizeMaximum nesting depth of a JSON-RPC message (objects and arrays).
Values above MAX_SUPPORTED_JSON_DEPTH are clamped.
tool_timeout: DurationMaximum time a single tool call may run.
max_concurrent_calls: usizeMaximum number of tool calls executing at the same time. Calls
waiting on other services hold a slot while they wait, so the default
leaves room for them; memory is bounded by the transports (see
HttpConfig::max_body_bytes_in_flight).
Implementations§
Trait Implementations§
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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