NominalClientBuilder#

pub struct NominalClientBuilder#

Builds a NominalClient when callers need to customize optional client settings.

The default base URL is https://api.gov.nominal.io/api, and the default user agent is nominal-rust/<crate version>.

Implementations#

impl NominalClientBuilder
pub fn from_profile_config(profile: &Profile) -> Self#
pub fn base_url(self, base_url: impl Into<String>) -> Self#

Override the default base URL.

pub fn workspace_rid(self, workspace_rid: Option<String>) -> Self#
pub fn user_agent(self, name: &str, version: &str) -> Self#

Override the default User-Agent value.

The generated header starts with name/version. Self::build returns Error::InvalidUserAgent unless the name and version satisfy ProductAgent::new.

pub fn build(self) -> Result<NominalClient>#

Trait implementations#

Auto traits: Send, Sync, Unpin, UnwindSafe, RefUnwindSafe