Struct scratchstack_aws_principal::FederatedUser
source · [−]pub struct FederatedUser { /* private fields */ }
Expand description
Details about a federated user.
Implementations
sourceimpl FederatedUser
impl FederatedUser
sourcepub fn new(
partition: &str,
account_id: &str,
user_name: &str
) -> Result<Self, PrincipalError>
pub fn new(
partition: &str,
account_id: &str,
user_name: &str
) -> Result<Self, PrincipalError>
Create a FederatedUser object.
partition
: The partition this principal exists in.account_id
: The 12 digit account id. This must be composed of 12 ASCII digits or a PrincipalError::InvalidAccountId error will be returned.user_name
: The name of the federated user. This must meet the following requirements or a PrincipalError::InvalidFederatedUserName error will be returned:- The name must contain between 2 and 32 characters.
- The name must be composed to ASCII alphanumeric characters or one of
, - . = @ _
.
If all of the requirements are met, a FederatedUser object is returned. Otherwise, a PrincipalError error is returned.
pub fn partition(&self) -> &str
pub fn account_id(&self) -> &str
pub fn user_name(&self) -> &str
Trait Implementations
sourceimpl Clone for FederatedUser
impl Clone for FederatedUser
sourcefn clone(&self) -> FederatedUser
fn clone(&self) -> FederatedUser
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FederatedUser
impl Debug for FederatedUser
sourceimpl Display for FederatedUser
impl Display for FederatedUser
sourceimpl From<&FederatedUser> for Arn
impl From<&FederatedUser> for Arn
sourcefn from(user: &FederatedUser) -> Arn
fn from(user: &FederatedUser) -> Arn
Converts to this type from the input type.
sourceimpl From<FederatedUser> for PrincipalIdentity
impl From<FederatedUser> for PrincipalIdentity
sourcefn from(federated_user: FederatedUser) -> Self
fn from(federated_user: FederatedUser) -> Self
Wrap a FederatedUser in a Principal.
sourceimpl Hash for FederatedUser
impl Hash for FederatedUser
sourceimpl Ord for FederatedUser
impl Ord for FederatedUser
sourcefn cmp(&self, other: &FederatedUser) -> Ordering
fn cmp(&self, other: &FederatedUser) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<FederatedUser> for FederatedUser
impl PartialEq<FederatedUser> for FederatedUser
sourcefn eq(&self, other: &FederatedUser) -> bool
fn eq(&self, other: &FederatedUser) -> bool
sourceimpl PartialOrd<FederatedUser> for FederatedUser
impl PartialOrd<FederatedUser> for FederatedUser
sourcefn partial_cmp(&self, other: &FederatedUser) -> Option<Ordering>
fn partial_cmp(&self, other: &FederatedUser) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for FederatedUser
impl StructuralEq for FederatedUser
impl StructuralPartialEq for FederatedUser
Auto Trait Implementations
impl RefUnwindSafe for FederatedUser
impl Send for FederatedUser
impl Sync for FederatedUser
impl Unpin for FederatedUser
impl UnwindSafe for FederatedUser
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more