pub struct Backoff {
pub connect_timeout_ms: u64,
pub current_interval_ms: u64,
pub initial_interval_ms: u64,
pub randomization_factor: f64,
pub multiplier: f64,
pub max_interval_ms: u64,
pub max_elapsed_time_ms: u64,
pub call_timeout_ms: u64,
}Expand description
Serializable MCP client tuning — the canonical mcp_backoff blob, as a
single JSON object. Covers the full retry/timeout knob set Client
uses: the connect + per-call timeouts plus the six exponential-backoff
parameters. Default is the project-wide default (connect 60000ms,
100ms / 100ms / 0.5 / 1.5 / 1000ms / 40000ms, call 60000ms) — the same
values the api and proxy already use when their MCP_* env vars are
unset. Field order mirrors Client::new’s timeout/backoff arguments.
Fields§
§connect_timeout_ms: u64§current_interval_ms: u64§initial_interval_ms: u64§randomization_factor: f64§multiplier: f64§max_interval_ms: u64§max_elapsed_time_ms: u64§call_timeout_ms: u64Trait Implementations§
impl Copy for Backoff
Source§impl<'de> Deserialize<'de> for Backoff
impl<'de> Deserialize<'de> for Backoff
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
Source§impl JsonSchema for Backoff
impl JsonSchema for Backoff
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Backoff
Auto Trait Implementations§
impl Freeze for Backoff
impl RefUnwindSafe for Backoff
impl Send for Backoff
impl Sync for Backoff
impl Unpin for Backoff
impl UnsafeUnpin for Backoff
impl UnwindSafe for Backoff
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more