pub struct DelegationToken { /* private fields */ }Expand description
A class representing a delegation token.
Corresponds to
org.apache.kafka.common.security.token.delegation.DelegationToken.
Implementations§
Source§impl DelegationToken
impl DelegationToken
Sourcepub fn new(token_information: TokenInformation, hmac: Vec<u8>) -> Self
pub fn new(token_information: TokenInformation, hmac: Vec<u8>) -> Self
Creates a delegation token from its information and HMAC bytes.
Sourcepub fn token_info(&self) -> &TokenInformation
pub fn token_info(&self) -> &TokenInformation
Returns the token information.
Mirrors DelegationToken.tokenInfo.
Sourcepub fn token_info_mut(&mut self) -> &mut TokenInformation
pub fn token_info_mut(&mut self) -> &mut TokenInformation
Returns a mutable reference to the token information.
Enables the mock’s renewDelegationToken, which mutates the stored
token’s expiry timestamp (token.tokenInfo().setExpiryTimestamp(...)).
Sourcepub fn hmac_as_base64_string(&self) -> String
pub fn hmac_as_base64_string(&self) -> String
Returns the HMAC bytes as a standard Base64 string.
Mirrors DelegationToken.hmacAsBase64String.
Trait Implementations§
Source§impl Clone for DelegationToken
impl Clone for DelegationToken
Source§fn clone(&self) -> DelegationToken
fn clone(&self) -> DelegationToken
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 DelegationToken
impl Debug for DelegationToken
Source§impl Display for DelegationToken
impl Display for DelegationToken
Source§impl Hash for DelegationToken
impl Hash for DelegationToken
Source§impl PartialEq for DelegationToken
impl PartialEq for DelegationToken
impl Eq for DelegationToken
impl StructuralPartialEq for DelegationToken
Auto Trait Implementations§
impl Freeze for DelegationToken
impl RefUnwindSafe for DelegationToken
impl Send for DelegationToken
impl Sync for DelegationToken
impl Unpin for DelegationToken
impl UnsafeUnpin for DelegationToken
impl UnwindSafe for DelegationToken
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
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§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
Checks if this value is equivalent to the given key. Read more