Struct HessraClientBuilder
pub struct HessraClientBuilder { /* private fields */ }
Expand description
Builder for creating Hessra clients
Implementations§
§impl HessraClientBuilder
impl HessraClientBuilder
pub fn new() -> HessraClientBuilder
pub fn new() -> HessraClientBuilder
Create a new client builder with default values
pub fn from_config(self, config: &HessraConfig) -> HessraClientBuilder
pub fn from_config(self, config: &HessraConfig) -> HessraClientBuilder
Create a client builder from a HessraConfig
pub fn base_url(self, base_url: impl Into<String>) -> HessraClientBuilder
pub fn base_url(self, base_url: impl Into<String>) -> HessraClientBuilder
Set the base URL for the client, e.g. “test.hessra.net”
pub fn mtls_key(self, mtls_key: impl Into<String>) -> HessraClientBuilder
pub fn mtls_key(self, mtls_key: impl Into<String>) -> HessraClientBuilder
Set the mTLS private key for the client PEM formatted string
pub fn mtls_cert(self, mtls_cert: impl Into<String>) -> HessraClientBuilder
pub fn mtls_cert(self, mtls_cert: impl Into<String>) -> HessraClientBuilder
Set the mTLS certificate for the client PEM formatted string
pub fn server_ca(self, server_ca: impl Into<String>) -> HessraClientBuilder
pub fn server_ca(self, server_ca: impl Into<String>) -> HessraClientBuilder
Set the server CA certificate for the client PEM formatted string
pub fn port(self, port: u16) -> HessraClientBuilder
pub fn port(self, port: u16) -> HessraClientBuilder
Set the port for the client
pub fn protocol(self, protocol: Protocol) -> HessraClientBuilder
pub fn protocol(self, protocol: Protocol) -> HessraClientBuilder
Set the protocol for the client
pub fn public_key(self, public_key: impl Into<String>) -> HessraClientBuilder
pub fn public_key(self, public_key: impl Into<String>) -> HessraClientBuilder
Set the public key for token verification PEM formatted string. note, this is JUST the public key, not the entire keypair.
pub fn personal_keypair(self, keypair: impl Into<String>) -> HessraClientBuilder
pub fn personal_keypair(self, keypair: impl Into<String>) -> HessraClientBuilder
Set the personal keypair for service chain attestation PEM formatted string. note, this is the entire keypair and needs to be kept secret.
pub fn build(self) -> Result<HessraClient, ApiError>
pub fn build(self) -> Result<HessraClient, ApiError>
Build the client
Trait Implementations§
§impl Default for HessraClientBuilder
impl Default for HessraClientBuilder
§fn default() -> HessraClientBuilder
fn default() -> HessraClientBuilder
Returns the “default value” for a type. Read more
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