Struct ruma::events::direct::OwnedDirectUserIdentifier
source · pub struct OwnedDirectUserIdentifier { /* private fields */ }
Available on crate feature
events
only.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§fn clone(&self) -> OwnedDirectUserIdentifier
fn clone(&self) -> OwnedDirectUserIdentifier
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 OwnedDirectUserIdentifier
impl Debug for OwnedDirectUserIdentifier
source§impl Deref for OwnedDirectUserIdentifier
impl Deref for OwnedDirectUserIdentifier
source§type Target = DirectUserIdentifier
type Target = DirectUserIdentifier
The resulting type after dereferencing.
source§impl<'de> Deserialize<'de> for OwnedDirectUserIdentifier
impl<'de> Deserialize<'de> for OwnedDirectUserIdentifier
source§fn deserialize<D>(
deserializer: D,
) -> Result<OwnedDirectUserIdentifier, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<OwnedDirectUserIdentifier, <D as Deserializer<'de>>::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) -> OwnedDirectUserIdentifier
fn from(value: &OwnedUserId) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
source§impl From<&UserId> for OwnedDirectUserIdentifier
impl From<&UserId> for OwnedDirectUserIdentifier
source§fn from(value: &UserId) -> OwnedDirectUserIdentifier
fn from(value: &UserId) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
source§impl From<&str> for OwnedDirectUserIdentifier
impl From<&str> for OwnedDirectUserIdentifier
source§fn from(s: &str) -> OwnedDirectUserIdentifier
fn from(s: &str) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
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) -> OwnedDirectUserIdentifier
fn from(value: OwnedUserId) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
source§impl From<String> for OwnedDirectUserIdentifier
impl From<String> for OwnedDirectUserIdentifier
source§fn from(s: String) -> OwnedDirectUserIdentifier
fn from(s: String) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
source§impl Hash for OwnedDirectUserIdentifier
impl Hash for OwnedDirectUserIdentifier
source§impl Ord for OwnedDirectUserIdentifier
impl Ord for OwnedDirectUserIdentifier
source§fn cmp(&self, other: &OwnedDirectUserIdentifier) -> Ordering
fn cmp(&self, other: &OwnedDirectUserIdentifier) -> 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<&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 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 Serialize for OwnedDirectUserIdentifier
impl Serialize for OwnedDirectUserIdentifier
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 TryFrom<&OwnedDirectUserIdentifier> for OwnedUserId
impl TryFrom<&OwnedDirectUserIdentifier> for OwnedUserId
source§fn try_from(
value: &OwnedDirectUserIdentifier,
) -> Result<OwnedUserId, <OwnedUserId as TryFrom<&OwnedDirectUserIdentifier>>::Error>
fn try_from( value: &OwnedDirectUserIdentifier, ) -> Result<OwnedUserId, <OwnedUserId as TryFrom<&OwnedDirectUserIdentifier>>::Error>
Performs the conversion.
source§impl TryFrom<OwnedDirectUserIdentifier> for OwnedUserId
impl TryFrom<OwnedDirectUserIdentifier> for OwnedUserId
source§fn try_from(
value: OwnedDirectUserIdentifier,
) -> Result<OwnedUserId, <OwnedUserId as TryFrom<OwnedDirectUserIdentifier>>::Error>
fn try_from( value: OwnedDirectUserIdentifier, ) -> Result<OwnedUserId, <OwnedUserId as TryFrom<OwnedDirectUserIdentifier>>::Error>
Performs the conversion.
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.source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more