pub struct Connection { /* private fields */ }Expand description
Per-connection negotiated state, owned by each transport run loop.
Custom transports built on handle_message_conn
create one Connection per client (via Connection::new /
Default) and pass &mut to it for every message on that connection, so
the caller identity and per-caller registry view negotiated at initialize
persist for the connection’s lifetime.
Defaults to “nothing negotiated yet”: dispatch then falls back to the
server’s shared identity, registry, and cached tools/list.
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a fresh, un-negotiated connection state.
Equivalent to Connection::default; provided for call-site clarity in
transport loops.
Trait Implementations§
Source§impl Default for Connection
impl Default for Connection
Source§fn default() -> Connection
fn default() -> Connection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Connection
impl !UnwindSafe for Connection
impl Freeze for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
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