pub struct TokenParams { /* private fields */ }Expand description
Inputs for minting an Ably JWT. capability is the capability JSON string
(with the capabilities feature, produce it via Capability::to_capability_string).
Implementations§
Source§impl TokenParams
impl TokenParams
Sourcepub fn new(capability: impl Into<String>) -> Self
pub fn new(capability: impl Into<String>) -> Self
New params with the given capability JSON string and a default 1-hour TTL.
Sourcepub fn client_id(self, id: impl Into<String>) -> Self
pub fn client_id(self, id: impl Into<String>) -> Self
Bind the token to a clientId (x-ably-clientId).
Sourcepub fn revocation_key(self, key: impl Into<String>) -> Self
pub fn revocation_key(self, key: impl Into<String>) -> Self
Set an x-ably-revocation-key so the JWT can be revoked by that key.
Auto Trait Implementations§
impl Freeze for TokenParams
impl RefUnwindSafe for TokenParams
impl Send for TokenParams
impl Sync for TokenParams
impl Unpin for TokenParams
impl UnsafeUnpin for TokenParams
impl UnwindSafe for TokenParams
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