pub struct CanonicalUser { /* private fields */ }
Expand description
Details about an S3 canonical user.
CanonicalUser structs are immutable.
Implementations§
Source§impl CanonicalUser
impl CanonicalUser
Sourcepub fn new(canonical_user_id: &str) -> Result<Self, PrincipalError>
pub fn new(canonical_user_id: &str) -> Result<Self, PrincipalError>
Create a CanonicalUser object.
§Arguments
canonical_user_id
: The canonical user id. This must be a 64 character hex string in lower-case form.
If all of the requirements are met, a CanonicalUser object is returned. Otherwise, a PrincipalError error is returned.
§Example
let canonical_user = CanonicalUser::new("9da4bcba2132ad952bba3c8ecb37e668d99b310ce313da30c98aba4cdf009a7d").unwrap();
assert_eq!(canonical_user.canonical_user_id(), "9da4bcba2132ad952bba3c8ecb37e668d99b310ce313da30c98aba4cdf009a7d");
Sourcepub fn canonical_user_id(&self) -> &str
pub fn canonical_user_id(&self) -> &str
The canonical user id.
Trait Implementations§
Source§impl Clone for CanonicalUser
impl Clone for CanonicalUser
Source§fn clone(&self) -> CanonicalUser
fn clone(&self) -> CanonicalUser
Returns a copy 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 Debug for CanonicalUser
impl Debug for CanonicalUser
Source§impl Display for CanonicalUser
impl Display for CanonicalUser
Source§impl From<CanonicalUser> for Principal
impl From<CanonicalUser> for Principal
Source§fn from(user: CanonicalUser) -> Self
fn from(user: CanonicalUser) -> Self
Converts to this type from the input type.
Source§impl From<CanonicalUser> for PrincipalIdentity
Wrap a CanonicalUser in a PrincipalIdentity.
impl From<CanonicalUser> for PrincipalIdentity
Wrap a CanonicalUser in a PrincipalIdentity.
Source§fn from(canonical_user: CanonicalUser) -> Self
fn from(canonical_user: CanonicalUser) -> Self
Converts to this type from the input type.
Source§impl Hash for CanonicalUser
impl Hash for CanonicalUser
Source§impl Ord for CanonicalUser
impl Ord for CanonicalUser
Source§fn cmp(&self, other: &CanonicalUser) -> Ordering
fn cmp(&self, other: &CanonicalUser) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CanonicalUser
impl PartialEq for CanonicalUser
Source§impl PartialOrd for CanonicalUser
impl PartialOrd for CanonicalUser
impl Eq for CanonicalUser
impl StructuralPartialEq for CanonicalUser
Auto Trait Implementations§
impl Freeze for CanonicalUser
impl RefUnwindSafe for CanonicalUser
impl Send for CanonicalUser
impl Sync for CanonicalUser
impl Unpin for CanonicalUser
impl UnwindSafe for CanonicalUser
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