pub struct ClientBuilder { /* private fields */ }Expand description
A builder for creating Client instances with customizable configurations.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn new() -> ClientBuilder
pub fn new() -> ClientBuilder
Creates a new ClientBuilder instance.
Sourcepub fn with_peers(self, peers: Vec<Peer>) -> ClientBuilder
pub fn with_peers(self, peers: Vec<Peer>) -> ClientBuilder
Adds multiple peers to the client configuration.
Sourcepub fn with_peer(self, peer: Peer) -> ClientBuilder
pub fn with_peer(self, peer: Peer) -> ClientBuilder
Adds a single peer to the client configuration.
Sourcepub fn with_tools(self, tools: Vec<Tool>) -> ClientBuilder
pub fn with_tools(self, tools: Vec<Tool>) -> ClientBuilder
Adds multiple tools to the client configuration. Use this to add local tools.
Sourcepub fn with_tool(self, tool: Tool) -> ClientBuilder
pub fn with_tool(self, tool: Tool) -> ClientBuilder
Adds a single tool to the client configuration. Use this to add a local tool.
Sourcepub fn with_capabilities(
self,
capabilities: ClientCapabilities,
) -> ClientBuilder
pub fn with_capabilities( self, capabilities: ClientCapabilities, ) -> ClientBuilder
Sets the capabilities for the client.
Trait Implementations§
Source§impl Default for ClientBuilder
impl Default for ClientBuilder
Source§fn default() -> ClientBuilder
fn default() -> ClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
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 moreCreates a shared type from an unshared type.