pub struct ClientBuilder<T: Transport> { /* private fields */ }
Expand description
Builder for creating configured Client
instances.
The ClientBuilder
provides a fluent API for configuring and creating
MCP clients with specific settings.
Implementations§
Source§impl<T: Transport> ClientBuilder<T>
impl<T: Transport> ClientBuilder<T>
Sourcepub fn set_protocol_version(self, protocol_version: ProtocolVersion) -> Self
pub fn set_protocol_version(self, protocol_version: ProtocolVersion) -> Self
Sourcepub fn set_capabilities(self, capabilities: ClientCapabilities) -> Self
pub fn set_capabilities(self, capabilities: ClientCapabilities) -> Self
Sourcepub fn with_secure_value(
self,
key: impl Into<String>,
value: SecureValue,
) -> Self
pub fn with_secure_value( self, key: impl Into<String>, value: SecureValue, ) -> Self
Sourcepub fn use_strict(self) -> Self
pub fn use_strict(self) -> Self
Enables strict mode, which requires initialization before operations.
§Returns
The modified builder instance
Sourcepub fn with_strict(self, strict: bool) -> Self
pub fn with_strict(self, strict: bool) -> Self
Auto Trait Implementations§
impl<T> Freeze for ClientBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for ClientBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for ClientBuilder<T>
impl<T> Sync for ClientBuilder<T>
impl<T> Unpin for ClientBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for ClientBuilder<T>where
T: UnwindSafe,
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