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§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 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 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§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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