pub struct OwnedDirectUserIdentifier { /* private fields */ }
Expand description
Owned variant of DirectUserIdentifier
The wrapper type for this type is variable, by default it’ll use Box
,
but you can change that by setting “--cfg=ruma_identifiers_storage=...
” using
RUSTFLAGS
or .cargo/config.toml
(under [build]
-> rustflags = ["..."]
)
to the following;
ruma_identifiers_storage="Arc"
to useArc
as a wrapper type.
Implementations§
Source§impl OwnedDirectUserIdentifier
impl OwnedDirectUserIdentifier
Sourcepub fn as_user_id(&self) -> Option<&UserId>
pub fn as_user_id(&self) -> Option<&UserId>
Get this OwnedDirectUserIdentifier
as an UserId
if it is one.
Sourcepub fn into_user_id(self) -> Option<OwnedUserId>
pub fn into_user_id(self) -> Option<OwnedUserId>
Get this OwnedDirectUserIdentifier
as an OwnedUserId
if it is one.
Methods from Deref<Target = DirectUserIdentifier>§
Trait Implementations§
Source§impl AsRef<[u8]> for OwnedDirectUserIdentifier
impl AsRef<[u8]> for OwnedDirectUserIdentifier
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 OwnedDirectUserIdentifier
impl AsRef<str> for OwnedDirectUserIdentifier
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 OwnedDirectUserIdentifier
impl Clone for OwnedDirectUserIdentifier
Source§impl Debug for OwnedDirectUserIdentifier
impl Debug for OwnedDirectUserIdentifier
Source§impl Deref for OwnedDirectUserIdentifier
impl Deref for OwnedDirectUserIdentifier
Source§impl<'de> Deserialize<'de> for OwnedDirectUserIdentifier
impl<'de> Deserialize<'de> for OwnedDirectUserIdentifier
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for OwnedDirectUserIdentifier
impl Display for OwnedDirectUserIdentifier
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<&OwnedUserId> for OwnedDirectUserIdentifier
impl From<&OwnedUserId> for OwnedDirectUserIdentifier
Source§fn from(value: &OwnedUserId) -> Self
fn from(value: &OwnedUserId) -> Self
Converts to this type from the input type.
Source§impl From<&UserId> for OwnedDirectUserIdentifier
impl From<&UserId> for OwnedDirectUserIdentifier
Source§impl From<&str> for OwnedDirectUserIdentifier
impl From<&str> for OwnedDirectUserIdentifier
Source§impl From<Arc<DirectUserIdentifier>> for OwnedDirectUserIdentifier
impl From<Arc<DirectUserIdentifier>> for OwnedDirectUserIdentifier
Source§fn from(a: Arc<DirectUserIdentifier>) -> OwnedDirectUserIdentifier
fn from(a: Arc<DirectUserIdentifier>) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
Source§impl From<Box<DirectUserIdentifier>> for OwnedDirectUserIdentifier
impl From<Box<DirectUserIdentifier>> for OwnedDirectUserIdentifier
Source§fn from(b: Box<DirectUserIdentifier>) -> OwnedDirectUserIdentifier
fn from(b: Box<DirectUserIdentifier>) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
Source§impl From<OwnedDirectUserIdentifier> for Arc<DirectUserIdentifier>
impl From<OwnedDirectUserIdentifier> for Arc<DirectUserIdentifier>
Source§fn from(a: OwnedDirectUserIdentifier) -> Arc<DirectUserIdentifier>
fn from(a: OwnedDirectUserIdentifier) -> Arc<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 From<OwnedDirectUserIdentifier> for String
impl From<OwnedDirectUserIdentifier> for String
Source§fn from(id: OwnedDirectUserIdentifier) -> String
fn from(id: OwnedDirectUserIdentifier) -> String
Converts to this type from the input type.
Source§impl From<OwnedUserId> for OwnedDirectUserIdentifier
impl From<OwnedUserId> for OwnedDirectUserIdentifier
Source§fn from(value: OwnedUserId) -> Self
fn from(value: OwnedUserId) -> Self
Converts to this type from the input type.
Source§impl From<String> for OwnedDirectUserIdentifier
impl From<String> for OwnedDirectUserIdentifier
Source§impl Hash for OwnedDirectUserIdentifier
impl Hash for OwnedDirectUserIdentifier
Source§impl Ord for OwnedDirectUserIdentifier
impl Ord for OwnedDirectUserIdentifier
Source§impl PartialEq<&UserId> for OwnedDirectUserIdentifier
impl PartialEq<&UserId> for OwnedDirectUserIdentifier
Source§impl PartialEq<&str> for OwnedDirectUserIdentifier
impl PartialEq<&str> for OwnedDirectUserIdentifier
Source§impl PartialEq<OwnedDirectUserIdentifier> for &UserId
impl PartialEq<OwnedDirectUserIdentifier> for &UserId
Source§impl PartialEq<OwnedDirectUserIdentifier> for &str
impl PartialEq<OwnedDirectUserIdentifier> for &str
Source§impl PartialEq<OwnedDirectUserIdentifier> for String
impl PartialEq<OwnedDirectUserIdentifier> for String
Source§impl PartialEq<OwnedDirectUserIdentifier> for str
impl PartialEq<OwnedDirectUserIdentifier> for str
Source§impl PartialEq<String> for OwnedDirectUserIdentifier
impl PartialEq<String> for OwnedDirectUserIdentifier
Source§impl PartialEq<str> for OwnedDirectUserIdentifier
impl PartialEq<str> for OwnedDirectUserIdentifier
Source§impl PartialOrd for OwnedDirectUserIdentifier
impl PartialOrd for OwnedDirectUserIdentifier
Source§impl TryFrom<&OwnedDirectUserIdentifier> for OwnedUserId
impl TryFrom<&OwnedDirectUserIdentifier> for OwnedUserId
impl Eq for OwnedDirectUserIdentifier
Auto Trait Implementations§
impl Freeze for OwnedDirectUserIdentifier
impl RefUnwindSafe for OwnedDirectUserIdentifier
impl Send for OwnedDirectUserIdentifier
impl Sync for OwnedDirectUserIdentifier
impl Unpin for OwnedDirectUserIdentifier
impl UnwindSafe for OwnedDirectUserIdentifier
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.