Enum ruma_client_api::uiaa::UserIdentifier
source · [−]pub enum UserIdentifier<'a> {
UserIdOrLocalpart(&'a str),
ThirdPartyId {
address: &'a str,
medium: Medium,
},
PhoneNumber {
country: &'a str,
phone: &'a str,
},
}
Expand description
Identification information for the user.
Variants
UserIdOrLocalpart(&'a str)
Either a fully qualified Matrix user ID, or just the localpart (as part of the ‘identifier’ field).
ThirdPartyId
Fields
address: &'a str
Third party identifier for the user.
medium: Medium
The medium of the identifier.
Third party identifier (as part of the ‘identifier’ field).
PhoneNumber
Same as third-party identification with medium == msisdn, but with a non-canonicalised phone number.
Implementations
sourceimpl<'a> UserIdentifier<'a>
impl<'a> UserIdentifier<'a>
sourcepub fn email(address: &'a str) -> Self
pub fn email(address: &'a str) -> Self
Creates a UserIdentifier::ThirdPartyId
from an email address.
Trait Implementations
sourceimpl<'a> Clone for UserIdentifier<'a>
impl<'a> Clone for UserIdentifier<'a>
sourcefn clone(&self) -> UserIdentifier<'a>
fn clone(&self) -> UserIdentifier<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for UserIdentifier<'a>
impl<'a> Debug for UserIdentifier<'a>
sourceimpl<'a> From<&'a OwnedUserId> for UserIdentifier<'a>
impl<'a> From<&'a OwnedUserId> for UserIdentifier<'a>
sourcefn from(id: &'a OwnedUserId) -> Self
fn from(id: &'a OwnedUserId) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<&'a UserId> for UserIdentifier<'a>
impl<'a> From<&'a UserId> for UserIdentifier<'a>
sourceimpl<'a> PartialEq<UserIdentifier<'a>> for UserIdentifier<'a>
impl<'a> PartialEq<UserIdentifier<'a>> for UserIdentifier<'a>
sourcefn eq(&self, other: &UserIdentifier<'a>) -> bool
fn eq(&self, other: &UserIdentifier<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UserIdentifier<'a>) -> bool
fn ne(&self, other: &UserIdentifier<'a>) -> bool
This method tests for !=
.
sourceimpl<'a> Serialize for UserIdentifier<'a>
impl<'a> Serialize for UserIdentifier<'a>
impl<'a> Eq for UserIdentifier<'a>
impl<'a> StructuralEq for UserIdentifier<'a>
impl<'a> StructuralPartialEq for UserIdentifier<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for UserIdentifier<'a>
impl<'a> Send for UserIdentifier<'a>
impl<'a> Sync for UserIdentifier<'a>
impl<'a> Unpin for UserIdentifier<'a>
impl<'a> UnwindSafe for UserIdentifier<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more