pub struct ClientBuilder<'a> { /* private fields */ }Implementations§
Source§impl<'a> ClientBuilder<'a>
impl<'a> ClientBuilder<'a>
pub fn new(target: &'a str) -> Self
Sourcepub fn credentials(self, username: &'a str, password: &'a str) -> Self
pub fn credentials(self, username: &'a str, password: &'a str) -> Self
Configure credentials to use for connecting to the target device.
Sourcepub fn tls(
self,
ca_certificate: impl AsRef<[u8]>,
domain_name: impl Into<String>,
) -> Self
pub fn tls( self, ca_certificate: impl AsRef<[u8]>, domain_name: impl Into<String>, ) -> Self
Configure TLS to use for connecting to the target device.
Sourcepub fn dangerous(self) -> DangerousClientBuilder<'a>
Available on crate feature dangerous_configuration only.
pub fn dangerous(self) -> DangerousClientBuilder<'a>
dangerous_configuration only.Access configuration options that are dangerous and require extra care.
Sourcepub async fn build(
self,
) -> Result<Client<InterceptedService<Channel, AuthInterceptor>>, GinmiError>
pub async fn build( self, ) -> Result<Client<InterceptedService<Channel, AuthInterceptor>>, GinmiError>
Consume the ClientBuilder and return a Client.
§Errors
- Returns
GinmiError::InvalidUriErrorif specified target is not a valid URI. - Returns
GinmiError::TransportErrorif the TLS-Settings are invalid. - Returns
GinmiError::TransportErrorif a connection to the target could not be established.
Trait Implementations§
Source§impl<'a> Clone for ClientBuilder<'a>
impl<'a> Clone for ClientBuilder<'a>
Source§fn clone(&self) -> ClientBuilder<'a>
fn clone(&self) -> ClientBuilder<'a>
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 moreSource§impl<'a> Debug for ClientBuilder<'a>
impl<'a> Debug for ClientBuilder<'a>
Source§impl<'a> From<ClientBuilder<'a>> for DangerousClientBuilder<'a>
Available on crate feature dangerous_configuration only.
impl<'a> From<ClientBuilder<'a>> for DangerousClientBuilder<'a>
Available on crate feature
dangerous_configuration only.Source§fn from(builder: ClientBuilder<'a>) -> Self
fn from(builder: ClientBuilder<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for ClientBuilder<'a>
impl<'a> RefUnwindSafe for ClientBuilder<'a>
impl<'a> Send for ClientBuilder<'a>
impl<'a> Sync for ClientBuilder<'a>
impl<'a> Unpin for ClientBuilder<'a>
impl<'a> UnwindSafe for ClientBuilder<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request