Struct ruma::events::direct::DirectUserIdentifier
source · pub struct DirectUserIdentifier(/* private fields */);
Available on crate feature
events
only.Expand description
Implementations§
source§impl DirectUserIdentifier
impl DirectUserIdentifier
sourcepub fn as_user_id(&self) -> Option<&UserId>
pub fn as_user_id(&self) -> Option<&UserId>
Get this DirectUserIdentifier
as an UserId
if it is one.
Trait Implementations§
source§impl AsRef<[u8]> for DirectUserIdentifier
impl AsRef<[u8]> for DirectUserIdentifier
source§impl AsRef<DirectUserIdentifier> for DirectUserIdentifier
impl AsRef<DirectUserIdentifier> for DirectUserIdentifier
source§fn as_ref(&self) -> &DirectUserIdentifier
fn as_ref(&self) -> &DirectUserIdentifier
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<DirectUserIdentifier> for OwnedDirectUserIdentifier
impl AsRef<DirectUserIdentifier> for OwnedDirectUserIdentifier
source§fn as_ref(&self) -> &DirectUserIdentifier
fn as_ref(&self) -> &DirectUserIdentifier
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<str> for DirectUserIdentifier
impl AsRef<str> for DirectUserIdentifier
source§impl Borrow<DirectUserIdentifier> for OwnedDirectUserIdentifier
impl Borrow<DirectUserIdentifier> for OwnedDirectUserIdentifier
source§fn borrow(&self) -> &DirectUserIdentifier
fn borrow(&self) -> &DirectUserIdentifier
Immutably borrows from an owned value. Read more
source§impl Clone for Box<DirectUserIdentifier>
impl Clone for Box<DirectUserIdentifier>
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 DirectUserIdentifier
impl Debug for DirectUserIdentifier
source§impl<'de> Deserialize<'de> for Box<DirectUserIdentifier>
impl<'de> Deserialize<'de> for Box<DirectUserIdentifier>
source§fn deserialize<D>(
deserializer: D,
) -> Result<Box<DirectUserIdentifier>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Box<DirectUserIdentifier>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for DirectUserIdentifier
impl Display for DirectUserIdentifier
source§impl From<&DirectUserIdentifier> for Arc<DirectUserIdentifier>
impl From<&DirectUserIdentifier> for Arc<DirectUserIdentifier>
source§fn from(s: &DirectUserIdentifier) -> Arc<DirectUserIdentifier>
fn from(s: &DirectUserIdentifier) -> Arc<DirectUserIdentifier>
Converts to this type from the input type.
source§impl From<&DirectUserIdentifier> for Box<DirectUserIdentifier>
impl From<&DirectUserIdentifier> for Box<DirectUserIdentifier>
source§fn from(id: &DirectUserIdentifier) -> Box<DirectUserIdentifier>
fn from(id: &DirectUserIdentifier) -> Box<DirectUserIdentifier>
Converts to this type from the input type.
source§impl From<&DirectUserIdentifier> for OwnedDirectUserIdentifier
impl From<&DirectUserIdentifier> for OwnedDirectUserIdentifier
source§fn from(id: &DirectUserIdentifier) -> OwnedDirectUserIdentifier
fn from(id: &DirectUserIdentifier) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
source§impl From<&DirectUserIdentifier> for Rc<DirectUserIdentifier>
impl From<&DirectUserIdentifier> for Rc<DirectUserIdentifier>
source§fn from(s: &DirectUserIdentifier) -> Rc<DirectUserIdentifier>
fn from(s: &DirectUserIdentifier) -> Rc<DirectUserIdentifier>
Converts to this type from the input type.
source§impl From<&DirectUserIdentifier> for String
impl From<&DirectUserIdentifier> for String
source§fn from(id: &DirectUserIdentifier) -> String
fn from(id: &DirectUserIdentifier) -> String
Converts to this type from the input type.
source§impl<'a> From<&'a UserId> for &'a DirectUserIdentifier
impl<'a> From<&'a UserId> for &'a DirectUserIdentifier
source§fn from(value: &'a UserId) -> &'a DirectUserIdentifier
fn from(value: &'a UserId) -> &'a DirectUserIdentifier
Converts to this type from the input type.
source§impl<'a> From<&'a str> for &'a DirectUserIdentifier
impl<'a> From<&'a str> for &'a DirectUserIdentifier
source§fn from(s: &'a str) -> &'a DirectUserIdentifier
fn from(s: &'a str) -> &'a DirectUserIdentifier
Converts to this type from the input type.
source§impl From<OwnedDirectUserIdentifier> for Box<DirectUserIdentifier>
impl From<OwnedDirectUserIdentifier> for Box<DirectUserIdentifier>
source§fn from(a: OwnedDirectUserIdentifier) -> Box<DirectUserIdentifier>
fn from(a: OwnedDirectUserIdentifier) -> Box<DirectUserIdentifier>
Converts to this type from the input type.
source§impl Hash for DirectUserIdentifier
impl Hash for DirectUserIdentifier
source§impl Ord for DirectUserIdentifier
impl Ord for DirectUserIdentifier
source§impl PartialEq<&DirectUserIdentifier> for &UserId
impl PartialEq<&DirectUserIdentifier> for &UserId
source§impl PartialEq<&DirectUserIdentifier> for Box<DirectUserIdentifier>
impl PartialEq<&DirectUserIdentifier> for Box<DirectUserIdentifier>
source§impl PartialEq<&DirectUserIdentifier> for OwnedUserId
impl PartialEq<&DirectUserIdentifier> for OwnedUserId
source§impl PartialEq<&UserId> for &DirectUserIdentifier
impl PartialEq<&UserId> for &DirectUserIdentifier
source§impl PartialEq<&str> for DirectUserIdentifier
impl PartialEq<&str> for DirectUserIdentifier
source§impl PartialEq<Box<DirectUserIdentifier>> for &DirectUserIdentifier
impl PartialEq<Box<DirectUserIdentifier>> for &DirectUserIdentifier
source§impl PartialEq<DirectUserIdentifier> for &str
impl PartialEq<DirectUserIdentifier> for &str
source§impl PartialEq<DirectUserIdentifier> for str
impl PartialEq<DirectUserIdentifier> for str
source§impl PartialEq<OwnedUserId> for &DirectUserIdentifier
impl PartialEq<OwnedUserId> for &DirectUserIdentifier
source§impl PartialEq<String> for DirectUserIdentifier
impl PartialEq<String> for DirectUserIdentifier
source§impl PartialEq<str> for DirectUserIdentifier
impl PartialEq<str> for DirectUserIdentifier
source§impl PartialEq for DirectUserIdentifier
impl PartialEq for DirectUserIdentifier
source§impl PartialOrd for DirectUserIdentifier
impl PartialOrd for DirectUserIdentifier
source§impl Serialize for DirectUserIdentifier
impl Serialize for DirectUserIdentifier
source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl ToOwned for DirectUserIdentifier
impl ToOwned for DirectUserIdentifier
source§type Owned = OwnedDirectUserIdentifier
type Owned = OwnedDirectUserIdentifier
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> <DirectUserIdentifier as ToOwned>::Owned
fn to_owned(&self) -> <DirectUserIdentifier as ToOwned>::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
source§impl<'a> TryFrom<&'a DirectUserIdentifier> for &'a UserId
impl<'a> TryFrom<&'a DirectUserIdentifier> for &'a UserId
source§impl TryFrom<&DirectUserIdentifier> for OwnedUserId
impl TryFrom<&DirectUserIdentifier> for OwnedUserId
source§fn try_from(
value: &DirectUserIdentifier,
) -> Result<OwnedUserId, <OwnedUserId as TryFrom<&DirectUserIdentifier>>::Error>
fn try_from( value: &DirectUserIdentifier, ) -> Result<OwnedUserId, <OwnedUserId as TryFrom<&DirectUserIdentifier>>::Error>
Performs the conversion.
impl Eq for DirectUserIdentifier
impl StructuralPartialEq for DirectUserIdentifier
Auto Trait Implementations§
impl Freeze for DirectUserIdentifier
impl RefUnwindSafe for DirectUserIdentifier
impl Send for DirectUserIdentifier
impl !Sized for DirectUserIdentifier
impl Sync for DirectUserIdentifier
impl Unpin for DirectUserIdentifier
impl UnwindSafe for DirectUserIdentifier
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.