Struct ruma_events::direct::OwnedDirectUserIdentifier
source · 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.