pub struct WebA2AClientBuilder { /* private fields */ }Expand description
Builder for WebA2AClient.
Provides a fluent API for configuring the client with optional WebSocket support.
§Examples
use a2a_client::WebA2AClient;
// HTTP-only client
let client = WebA2AClient::builder()
.http_url("http://localhost:8080")
.build();
// Client with WebSocket support
let client = WebA2AClient::builder()
.http_url("http://localhost:8080")
.ws_url("ws://localhost:8080/ws")
.build();Implementations§
Source§impl WebA2AClientBuilder
impl WebA2AClientBuilder
Sourcepub fn http_url(self, url: impl Into<String>) -> Self
pub fn http_url(self, url: impl Into<String>) -> Self
Set the HTTP base URL.
§Examples
use a2a_client::WebA2AClient;
let client = WebA2AClient::builder()
.http_url("http://localhost:8080")
.build();Sourcepub fn ws_url(self, url: impl Into<String>) -> Self
pub fn ws_url(self, url: impl Into<String>) -> Self
Set the WebSocket URL.
§Examples
use a2a_client::WebA2AClient;
let client = WebA2AClient::builder()
.http_url("http://localhost:8080")
.ws_url("ws://localhost:8080/ws")
.build();Sourcepub fn build(self) -> WebA2AClient
pub fn build(self) -> WebA2AClient
Build the WebA2AClient.
§Panics
Panics if http_url was not set.
§Examples
use a2a_client::WebA2AClient;
let client = WebA2AClient::builder()
.http_url("http://localhost:8080")
.build();Trait Implementations§
Source§impl Default for WebA2AClientBuilder
impl Default for WebA2AClientBuilder
Source§fn default() -> WebA2AClientBuilder
fn default() -> WebA2AClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WebA2AClientBuilder
impl RefUnwindSafe for WebA2AClientBuilder
impl Send for WebA2AClientBuilder
impl Sync for WebA2AClientBuilder
impl Unpin for WebA2AClientBuilder
impl UnsafeUnpin for WebA2AClientBuilder
impl UnwindSafe for WebA2AClientBuilder
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