pub struct ClientBuilder { /* private fields */ }Expand description
A builder for creating a Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn new(data_url: impl Into<String>, ctrl_url: impl Into<String>) -> Self
pub fn new(data_url: impl Into<String>, ctrl_url: impl Into<String>) -> Self
Create a new client builder with the given data server url and control server url.
§Examples
use percas_client::ClientBuilder;
let builder = ClientBuilder::new("http://percas-data:8080", "http://percas-ctrl:8081");
let client = builder.build().unwrap();
let _ = client; // use clientSourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Set a custom HTTP client. If not set, a default client will be used.
Trait Implementations§
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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