pub struct AdminConfig {
pub bootstrap_servers: Vec<String>,
pub client_id: String,
pub security_protocol: SecurityProtocol,
pub tls: TlsConfig,
pub sasl: SaslConfig,
pub request_timeout: Duration,
pub tcp_connector: Arc<dyn TcpConnector>,
}Expand description
Admin Config.
Fields§
§bootstrap_servers: Vec<String>Bootstrap Servers.
client_id: StringClient Id.
security_protocol: SecurityProtocolSecurity Protocol.
tls: TlsConfigTls.
sasl: SaslConfigSasl.
request_timeout: DurationRequest Timeout.
tcp_connector: Arc<dyn TcpConnector>TCP connector.
Implementations§
Source§impl AdminConfig
impl AdminConfig
Sourcepub fn with_client_id(self, client_id: impl Into<String>) -> Self
pub fn with_client_id(self, client_id: impl Into<String>) -> Self
Sets client id and returns the updated value.
Sourcepub fn with_bootstrap_servers(
self,
servers: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_bootstrap_servers( self, servers: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets bootstrap servers and returns the updated value.
Sourcepub fn with_security_protocol(self, security_protocol: SecurityProtocol) -> Self
pub fn with_security_protocol(self, security_protocol: SecurityProtocol) -> Self
Sets security protocol and returns the updated value.
Sourcepub fn with_tls_ca_cert_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_tls_ca_cert_path(self, path: impl Into<PathBuf>) -> Self
Sets tls ca cert path and returns the updated value.
Sourcepub fn with_tls_client_auth_paths(
self,
cert_path: impl Into<PathBuf>,
key_path: impl Into<PathBuf>,
) -> Self
pub fn with_tls_client_auth_paths( self, cert_path: impl Into<PathBuf>, key_path: impl Into<PathBuf>, ) -> Self
Sets tls client auth paths and returns the updated value.
Sourcepub fn with_tls_server_name(self, server_name: impl Into<String>) -> Self
pub fn with_tls_server_name(self, server_name: impl Into<String>) -> Self
Sets tls server name and returns the updated value.
Sourcepub fn with_sasl(self, sasl: SaslConfig) -> Self
pub fn with_sasl(self, sasl: SaslConfig) -> Self
Sets sasl and returns the updated value.
Sourcepub fn with_sasl_plain(
self,
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn with_sasl_plain( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
Sets sasl plain and returns the updated value.
Sourcepub fn with_sasl_scram_sha_256(
self,
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn with_sasl_scram_sha_256( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
Sets sasl scram sha 256 and returns the updated value.
Sourcepub fn with_sasl_scram_sha_512(
self,
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn with_sasl_scram_sha_512( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
Sets sasl scram sha 512 and returns the updated value.
Sourcepub fn with_request_timeout(self, request_timeout: Duration) -> Self
pub fn with_request_timeout(self, request_timeout: Duration) -> Self
Sets request timeout and returns the updated value.
Sourcepub fn with_tcp_connector(self, tcp_connector: Arc<dyn TcpConnector>) -> Self
pub fn with_tcp_connector(self, tcp_connector: Arc<dyn TcpConnector>) -> Self
Sets TCP connector and returns the updated value.
Trait Implementations§
Source§impl Clone for AdminConfig
impl Clone for AdminConfig
Source§fn clone(&self) -> AdminConfig
fn clone(&self) -> AdminConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AdminConfig
impl !RefUnwindSafe for AdminConfig
impl Send for AdminConfig
impl Sync for AdminConfig
impl Unpin for AdminConfig
impl UnsafeUnpin for AdminConfig
impl !UnwindSafe for AdminConfig
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