pub struct AdminClientBuilder { /* private fields */ }Expand description
Builder for AdminClient.
Implementations§
Source§impl AdminClientBuilder
impl AdminClientBuilder
Sourcepub fn service_url(self, url: Url) -> Self
pub fn service_url(self, url: Url) -> Self
Set the service URL — the base for /admin/v2/.... Required.
Sourcepub fn token(self, token: String) -> Self
pub fn token(self, token: String) -> Self
Configure bearer-token auth (Authorization: Bearer <token>).
Sourcepub fn oauth2(self, flow: Arc<ClientCredentialsFlow>) -> Self
pub fn oauth2(self, flow: Arc<ClientCredentialsFlow>) -> Self
Configure OAuth2 client_credentials auth. The shared flow’s token
cache is refreshed on demand at request time (see AdminAuth::OAuth2).
Sourcepub fn tls_trust_cert_pem(self, pem: Vec<u8>) -> Self
pub fn tls_trust_cert_pem(self, pem: Vec<u8>) -> Self
Add a custom CA root (PEM bytes) to the HTTPS trust store. Mirrors
pulsarctl’s tls_trust_certs_file_path. The CLI reads the file and
passes its bytes here.
Sourcepub fn tls_allow_insecure(self, allow: bool) -> Self
pub fn tls_allow_insecure(self, allow: bool) -> Self
Disable TLS certificate verification (danger_accept_invalid_certs).
Mirrors pulsarctl’s tls_allow_insecure_connection. Insecure —
only for self-signed dev brokers; never in production.
Sourcepub fn timeout(self, dur: Duration) -> Self
pub fn timeout(self, dur: Duration) -> Self
Override the request timeout. Defaults to DEFAULT_TIMEOUT.
Sourcepub fn build(self) -> Result<AdminClient, AdminError>
pub fn build(self) -> Result<AdminClient, AdminError>
Build the client.
Trait Implementations§
Source§impl Debug for AdminClientBuilder
impl Debug for AdminClientBuilder
Source§impl Default for AdminClientBuilder
impl Default for AdminClientBuilder
Source§fn default() -> AdminClientBuilder
fn default() -> AdminClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AdminClientBuilder
impl !UnwindSafe for AdminClientBuilder
impl Freeze for AdminClientBuilder
impl Send for AdminClientBuilder
impl Sync for AdminClientBuilder
impl Unpin for AdminClientBuilder
impl UnsafeUnpin for AdminClientBuilder
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