pub struct TokenBuilder { /* private fields */ }Expand description
Builder for creating capability tokens
Implementations§
Source§impl TokenBuilder
impl TokenBuilder
Sourcepub fn with_namespace(self, namespace: impl Into<String>) -> Self
pub fn with_namespace(self, namespace: impl Into<String>) -> Self
Add another namespace
Sourcepub fn with_tenant(self, tenant_id: impl Into<String>) -> Self
pub fn with_tenant(self, tenant_id: impl Into<String>) -> Self
Set tenant ID
Sourcepub fn with_project(self, project_id: impl Into<String>) -> Self
pub fn with_project(self, project_id: impl Into<String>) -> Self
Set project ID
Sourcepub fn can_delete(self) -> Self
pub fn can_delete(self) -> Self
Enable delete capability
Sourcepub fn full_access(self) -> Self
pub fn full_access(self) -> Self
Enable all capabilities
Add ACL tags
Sourcepub fn build_unsigned(self) -> CapabilityToken
pub fn build_unsigned(self) -> CapabilityToken
Build the token (unsigned - call sign() on TokenSigner)
Auto Trait Implementations§
impl Freeze for TokenBuilder
impl RefUnwindSafe for TokenBuilder
impl Send for TokenBuilder
impl Sync for TokenBuilder
impl Unpin for TokenBuilder
impl UnsafeUnpin for TokenBuilder
impl UnwindSafe for TokenBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more