pub struct ClientBuilder { /* private fields */ }Expand description
Configures a Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn token(self, token: impl Into<String>) -> Self
pub fn token(self, token: impl Into<String>) -> Self
Authenticate with a bearer token: an API key from feltdb-server keys create, or an
application session’s access token.
Sourcepub fn tenant(self, tenant_id: impl Into<String>) -> Self
pub fn tenant(self, tenant_id: impl Into<String>) -> Self
Bind every request to one tenant. A request the server resolves to another tenant is refused
with AUTHORITY_SCOPE_MISMATCH instead of being served.
Sourcepub fn tenant_environment(
self,
tenant_id: impl Into<String>,
environment_id: impl Into<String>,
) -> Self
pub fn tenant_environment( self, tenant_id: impl Into<String>, environment_id: impl Into<String>, ) -> Self
Bind every request to one tenant and one of its environments.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
How long one request may take before it is abandoned (30 seconds by default). Event streams are exempt: they stay open until closed.
Sourcepub fn add_root_certificate_pem(self, pem: impl Into<Vec<u8>>) -> Self
pub fn add_root_certificate_pem(self, pem: impl Into<Vec<u8>>) -> Self
Trust a PEM certificate authority in addition to the bundled public roots, for a server
whose certificate a private CA issued. Certificate verification is never disabled. A PEM
that does not parse is refused by ClientBuilder::build.
pub fn build(self) -> Result<Client>
Trait Implementations§
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
impl UnwindSafe for ClientBuilder
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