pub struct CreateDelegationTokenOptions { /* private fields */ }Expand description
Options for Admin::create_delegation_token.
Corresponds to
org.apache.kafka.clients.admin.CreateDelegationTokenOptions.
Implementations§
Source§impl CreateDelegationTokenOptions
impl CreateDelegationTokenOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates default options (default API timeout, server-default lifetime, no renewers, owner defaults to the request principal).
Sourcepub fn set_renewers(self, renewers: Vec<KafkaPrincipal>) -> Self
pub fn set_renewers(self, renewers: Vec<KafkaPrincipal>) -> Self
Sets the principals allowed to renew the token.
Mirrors CreateDelegationTokenOptions.renewers.
Sourcepub fn renewers(&self) -> &[KafkaPrincipal]
pub fn renewers(&self) -> &[KafkaPrincipal]
The principals allowed to renew the token.
Mirrors CreateDelegationTokenOptions.renewers.
Sourcepub fn set_owner(self, owner: KafkaPrincipal) -> Self
pub fn set_owner(self, owner: KafkaPrincipal) -> Self
Sets the owner of the token.
Mirrors CreateDelegationTokenOptions.owner.
Sourcepub fn owner(&self) -> Option<&KafkaPrincipal>
pub fn owner(&self) -> Option<&KafkaPrincipal>
The owner of the token, if set.
Mirrors CreateDelegationTokenOptions.owner, which returns an
Optional.
Sourcepub fn set_max_lifetime_ms(self, max_lifetime_ms: i64) -> Self
pub fn set_max_lifetime_ms(self, max_lifetime_ms: i64) -> Self
Sets the maximum lifetime of the token in milliseconds, or -1 to use
the server-side default.
Mirrors CreateDelegationTokenOptions.maxLifetimeMs.
Sourcepub fn max_lifetime_ms(&self) -> i64
pub fn max_lifetime_ms(&self) -> i64
The maximum lifetime of the token in milliseconds.
Mirrors CreateDelegationTokenOptions.maxLifetimeMs.
Sourcepub fn set_timeout_ms(self, timeout_ms: Option<i32>) -> Self
pub fn set_timeout_ms(self, timeout_ms: Option<i32>) -> Self
Set the timeout in milliseconds for this operation, or None to use the
default API timeout for the AdminClient.
Sourcepub fn timeout_ms(&self) -> Option<i32>
pub fn timeout_ms(&self) -> Option<i32>
The timeout in milliseconds for this operation, or None if the default
API timeout should be used.
Trait Implementations§
Source§impl Clone for CreateDelegationTokenOptions
impl Clone for CreateDelegationTokenOptions
Source§fn clone(&self) -> CreateDelegationTokenOptions
fn clone(&self) -> CreateDelegationTokenOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateDelegationTokenOptions
impl Debug for CreateDelegationTokenOptions
Source§impl PartialEq for CreateDelegationTokenOptions
impl PartialEq for CreateDelegationTokenOptions
Source§fn eq(&self, other: &CreateDelegationTokenOptions) -> bool
fn eq(&self, other: &CreateDelegationTokenOptions) -> bool
self and other values to be equal, and is used by ==.impl Eq for CreateDelegationTokenOptions
impl StructuralPartialEq for CreateDelegationTokenOptions
Auto Trait Implementations§
impl Freeze for CreateDelegationTokenOptions
impl RefUnwindSafe for CreateDelegationTokenOptions
impl Send for CreateDelegationTokenOptions
impl Sync for CreateDelegationTokenOptions
impl Unpin for CreateDelegationTokenOptions
impl UnsafeUnpin for CreateDelegationTokenOptions
impl UnwindSafe for CreateDelegationTokenOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.