ClientBuilder

Struct ClientBuilder 

Source
pub struct ClientBuilder<T>(/* private fields */);
Expand description

Builds a client to connect to eAPI.

Implementations§

Source§

impl ClientBuilder<UdsClientBuilder>

Source

pub fn set_sysname(self, sysname: String) -> Self

Sets the system name (usually not required).

Source

pub fn set_socket_name(self, socket_name: String) -> Self

Sets the Unix socket name (usually not required).

Source

pub fn build_blocking(self) -> Result<UdsClient, Error>

Builds a blocking Unix domain sockets client.

Source§

impl<T> ClientBuilder<HttpClientBuilder<T>>

Source

pub fn set_authentication(self, username: String, password: String) -> Self

Sets the credentials.

Source

pub fn set_timeout(self, timeout: Duration) -> Self

Sets the timeout. The timeout includes resolving the host, sending the request and executing the commands.

Source

pub fn enable_https(self) -> ClientBuilder<HttpClientBuilder<UseHttps>>

Use HTTPS.

Source§

impl ClientBuilder<HttpClientBuilder<UseHttp>>

Source

pub fn build_blocking(self) -> HttpClient

Builds a blocking HTTP client.

Source§

impl ClientBuilder<HttpClientBuilder<UseHttps>>

Source

pub fn set_insecure(self, value: bool) -> Self

Skips server certificate validation (useful in test scenarios when you have self-signed certificates).

Source

pub fn build_blocking(self) -> HttpClient

Builds a blocking HTTPS client.

Source§

impl ClientBuilder<()>

Source

pub fn unix_socket() -> ClientBuilder<UdsClientBuilder>

Build a client using Unix domain sockets to connect to eAPI.

Source

pub fn http(hostname: String) -> ClientBuilder<HttpClientBuilder<UseHttp>>

Build a client using HTTP(S) to connect to eAPI.

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>
where T: Send,

§

impl<T> Sync for ClientBuilder<T>
where T: Sync,

§

impl<T> Unpin for ClientBuilder<T>
where T: Unpin,

§

impl<T> UnwindSafe for ClientBuilder<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,