pub struct UserIdentityBuilder { /* private fields */ }Expand description
Builder for UserIdentity.
Implementations§
Source§impl UserIdentityBuilder
impl UserIdentityBuilder
Sourcepub fn display_name(self, name: impl Into<String>) -> Self
pub fn display_name(self, name: impl Into<String>) -> Self
Set the display name.
Sourcepub fn rank(self, rank: MilitaryRank) -> Self
pub fn rank(self, rank: MilitaryRank) -> Self
Set the rank.
Sourcepub fn clearance(self, clearance: SecurityClearance) -> Self
pub fn clearance(self, clearance: SecurityClearance) -> Self
Set the clearance.
Sourcepub fn unit(self, unit: OrganizationUnit) -> Self
pub fn unit(self, unit: OrganizationUnit) -> Self
Set the organizational unit.
Sourcepub fn roles(self, roles: impl IntoIterator<Item = Role>) -> Self
pub fn roles(self, roles: impl IntoIterator<Item = Role>) -> Self
Add multiple roles.
Sourcepub fn build(self) -> UserIdentity
pub fn build(self) -> UserIdentity
Build the UserIdentity.
Auto Trait Implementations§
impl Freeze for UserIdentityBuilder
impl RefUnwindSafe for UserIdentityBuilder
impl Send for UserIdentityBuilder
impl Sync for UserIdentityBuilder
impl Unpin for UserIdentityBuilder
impl UnsafeUnpin for UserIdentityBuilder
impl UnwindSafe for UserIdentityBuilder
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