pub struct ConnectionInner {
pub http_client: Client,
pub url: String,
pub session_id: String,
pub headers: IndexMap<String, String>,
pub backoff_current_interval: Duration,
pub backoff_initial_interval: Duration,
pub backoff_randomization_factor: f64,
pub backoff_multiplier: f64,
pub backoff_max_interval: Duration,
pub backoff_max_elapsed_time: Duration,
pub call_timeout: Duration,
pub initialize_result: InitializeResult,
/* private fields */
}Expand description
The actual connection state. Behind an Arc inside Connection.
Fields are public for read-only access (callers reach them via
Connection’s Deref), but every method on this type is private —
the public surface lives on Connection and delegates through.
Fields§
§http_client: Client§url: String§session_id: String§headers: IndexMap<String, String>All HTTP headers stamped on every POST / GET this connection
makes — the same merged map (defaults + caller overrides) the
Client built once during connect. Mcp-Session-Id,
Content-Type, and Accept are still set by the request
builders and override anything in headers.
backoff_current_interval: Duration§backoff_initial_interval: Duration§backoff_randomization_factor: f64§backoff_multiplier: f64§backoff_max_interval: Duration§backoff_max_elapsed_time: Duration§call_timeout: Duration§initialize_result: InitializeResultThe server’s capabilities and info from the initialize response.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ConnectionInner
impl !RefUnwindSafe for ConnectionInner
impl Send for ConnectionInner
impl Sync for ConnectionInner
impl Unpin for ConnectionInner
impl UnsafeUnpin for ConnectionInner
impl !UnwindSafe for ConnectionInner
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> 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