pub struct HessraClientBuilder { /* private fields */ }Expand description
Builder for creating Hessra clients
Implementations§
Source§impl HessraClientBuilder
impl HessraClientBuilder
Sourcepub fn from_config(self, config: &HessraConfig) -> Self
pub fn from_config(self, config: &HessraConfig) -> Self
Create a client builder from a HessraConfig
Sourcepub fn base_url(self, base_url: impl Into<String>) -> Self
pub fn base_url(self, base_url: impl Into<String>) -> Self
Set the base URL for the client, e.g. “test.hessra.net”
Sourcepub fn mtls_key(self, mtls_key: impl Into<String>) -> Self
pub fn mtls_key(self, mtls_key: impl Into<String>) -> Self
Set the mTLS private key for the client PEM formatted string
Sourcepub fn mtls_cert(self, mtls_cert: impl Into<String>) -> Self
pub fn mtls_cert(self, mtls_cert: impl Into<String>) -> Self
Set the mTLS certificate for the client PEM formatted string
Sourcepub fn server_ca(self, server_ca: impl Into<String>) -> Self
pub fn server_ca(self, server_ca: impl Into<String>) -> Self
Set the server CA certificate for the client PEM formatted string
Sourcepub fn public_key(self, public_key: impl Into<String>) -> Self
pub fn public_key(self, public_key: impl Into<String>) -> Self
Set the public key for token verification PEM formatted string. note, this is JUST the public key, not the entire keypair.
Sourcepub fn personal_keypair(self, keypair: impl Into<String>) -> Self
pub fn personal_keypair(self, keypair: impl Into<String>) -> Self
Set the personal keypair for service chain attestation PEM formatted string. note, this is the entire keypair and needs to be kept secret.
Sourcepub fn build(self) -> Result<HessraClient, ApiError>
pub fn build(self) -> Result<HessraClient, ApiError>
Build the client
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HessraClientBuilder
impl RefUnwindSafe for HessraClientBuilder
impl Send for HessraClientBuilder
impl Sync for HessraClientBuilder
impl Unpin for HessraClientBuilder
impl UnwindSafe for HessraClientBuilder
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