#[non_exhaustive]pub enum AdminClient {}Expand description
The base class for in-built admin clients.
Client code should use the newer Admin interface in preference to this
class.
§Translation notes
An uninhabited type: a namespace for AdminClient::create, never a
value.
Implementations§
Source§impl AdminClient
impl AdminClient
Sourcepub fn create(config: AdminClientConfig) -> Result<Box<dyn Admin>, Error>
pub fn create(config: AdminClientConfig) -> Result<Box<dyn Admin>, Error>
Create a new Admin with the given configuration.
§Arguments
config- The configuration.
§Returns
The new KafkaAdminClient.
§Errors
Error::is_kafka_error(Failed to create new KafkaAdminClient, the cause as its source) if neither or both ofbootstrap.serversandbootstrap.controllersare set, the bootstrap addresses cannot be resolved, the channel builder cannot be created, ordefault.api.timeout.msis set explicitly belowrequest.timeout.ms. For the first and the last the source answersError::is_config_error, as Java’sKafkaAdminClient.determineBootstrapTypeandKafkaAdminClient.configureDefaultApiTimeoutMsthrow.
§Panics
If called outside a Tokio runtime, which runs the client’s background task.
§Translation notes
Takes the parsed AdminClientConfig, not Java’s map.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AdminClient
impl RefUnwindSafe for AdminClient
impl Send for AdminClient
impl Sync for AdminClient
impl Unpin for AdminClient
impl UnsafeUnpin for AdminClient
impl UnwindSafe for AdminClient
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