pub struct TokenRestrictionBuilder { /* private fields */ }Expand description
Builder for TokenRestriction.
Implementations§
Source§impl TokenRestrictionBuilder
impl TokenRestrictionBuilder
Sourcepub fn allow_renew<VALUE>(
&mut self,
value: VALUE,
) -> &mut TokenRestrictionBuilder
pub fn allow_renew<VALUE>( &mut self, value: VALUE, ) -> &mut TokenRestrictionBuilder
Allow token renew.
Sourcepub fn allow_rescope<VALUE>(
&mut self,
value: VALUE,
) -> &mut TokenRestrictionBuilder
pub fn allow_rescope<VALUE>( &mut self, value: VALUE, ) -> &mut TokenRestrictionBuilder
Allow token rescope.
Sourcepub fn domain_id<VALUE>(&mut self, value: VALUE) -> &mut TokenRestrictionBuilder
pub fn domain_id<VALUE>(&mut self, value: VALUE) -> &mut TokenRestrictionBuilder
Domain ID the token restriction belongs to.
Sourcepub fn id<VALUE>(&mut self, value: VALUE) -> &mut TokenRestrictionBuilder
pub fn id<VALUE>(&mut self, value: VALUE) -> &mut TokenRestrictionBuilder
Token restriction ID.
Sourcepub fn project_id<VALUE>(
&mut self,
value: VALUE,
) -> &mut TokenRestrictionBuilder
pub fn project_id<VALUE>( &mut self, value: VALUE, ) -> &mut TokenRestrictionBuilder
Project ID that the token must be bound to.
Sourcepub fn user_id<VALUE>(&mut self, value: VALUE) -> &mut TokenRestrictionBuilder
pub fn user_id<VALUE>(&mut self, value: VALUE) -> &mut TokenRestrictionBuilder
User ID that the token must be bound to.
Sourcepub fn roles<VALUE>(&mut self, value: VALUE) -> &mut TokenRestrictionBuilder
pub fn roles<VALUE>(&mut self, value: VALUE) -> &mut TokenRestrictionBuilder
Bound token roles.
Sourcepub fn build(&self) -> Result<TokenRestriction, TokenRestrictionBuilderError>
pub fn build(&self) -> Result<TokenRestriction, TokenRestrictionBuilderError>
Trait Implementations§
Source§impl Clone for TokenRestrictionBuilder
impl Clone for TokenRestrictionBuilder
Source§fn clone(&self) -> TokenRestrictionBuilder
fn clone(&self) -> TokenRestrictionBuilder
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 Default for TokenRestrictionBuilder
impl Default for TokenRestrictionBuilder
Source§fn default() -> TokenRestrictionBuilder
fn default() -> TokenRestrictionBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TokenRestrictionBuilder
impl RefUnwindSafe for TokenRestrictionBuilder
impl Send for TokenRestrictionBuilder
impl Sync for TokenRestrictionBuilder
impl Unpin for TokenRestrictionBuilder
impl UnsafeUnpin for TokenRestrictionBuilder
impl UnwindSafe for TokenRestrictionBuilder
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,
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