pub struct CreateDelegationTokenOptions { /* private fields */ }Expand description
Options for Admin::create_delegation_token.
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
Sourcepub fn renewers(&self) -> &[KafkaPrincipal]
pub fn renewers(&self) -> &[KafkaPrincipal]
Returns the principals allowed to renew the token.
Sourcepub fn set_owner(self, owner: Option<KafkaPrincipal>) -> Self
pub fn set_owner(self, owner: Option<KafkaPrincipal>) -> Self
Sourcepub fn owner(&self) -> Option<&KafkaPrincipal>
pub fn owner(&self) -> Option<&KafkaPrincipal>
Returns the owner of the token, or None if not set.
Sourcepub fn set_max_lifetime_ms(self, max_lifetime_ms: i64) -> Self
pub fn set_max_lifetime_ms(self, max_lifetime_ms: i64) -> Self
Sourcepub fn max_lifetime_ms(&self) -> i64
pub fn max_lifetime_ms(&self) -> i64
Returns the maximum lifetime of the token in milliseconds.
Sourcepub fn set_timeout_ms(self, timeout_ms: Option<i32>) -> Self
pub fn set_timeout_ms(self, timeout_ms: Option<i32>) -> Self
Sourcepub fn timeout_ms(&self) -> Option<i32>
pub fn timeout_ms(&self) -> Option<i32>
Returns the timeout in milliseconds for this operation, or None if the
default API timeout for the AdminClient should be used.
Trait Implementations§
Source§impl Clone for CreateDelegationTokenOptions
impl Clone for CreateDelegationTokenOptions
Source§fn clone(&self) -> CreateDelegationTokenOptions
fn clone(&self) -> CreateDelegationTokenOptions
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 moreSource§impl Debug for CreateDelegationTokenOptions
impl Debug 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
Mutably borrows from an owned value. Read more