pub struct TransportOptions {
pub timeout: Duration,
pub max_line_length: usize,
pub channel_capacity: usize,
}Expand description
Configuration for the transport layer
Fields§
§timeout: DurationThe timeout in milliseconds for requests.
This value defines the maximum amount of time to wait for a response before considering the request as timed out.
max_line_length: usizeMaximum size (in bytes) of a single newline-delimited incoming message.
Messages exceeding this limit are dropped and logged with a warning; the stream stays alive and resumes on the next line. If you expect large tool results or responses, increase this value. Default: 16 MiB.
channel_capacity: usizeCapacity of the incoming-message channel buffer.
A larger value smooths out head-of-line jitter under bursty traffic at the cost of more buffered memory. Defaults to 36.
Trait Implementations§
Source§impl Clone for TransportOptions
impl Clone for TransportOptions
Source§fn clone(&self) -> TransportOptions
fn clone(&self) -> TransportOptions
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 TransportOptions
impl Debug for TransportOptions
Source§impl Default for TransportOptions
impl Default for TransportOptions
Source§fn default() -> TransportOptions
fn default() -> TransportOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TransportOptions
impl RefUnwindSafe for TransportOptions
impl Send for TransportOptions
impl Sync for TransportOptions
impl Unpin for TransportOptions
impl UnsafeUnpin for TransportOptions
impl UnwindSafe for TransportOptions
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