Struct OwnedDirectUserIdentifier
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§
§impl OwnedDirectUserIdentifier
impl OwnedDirectUserIdentifier
pub 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.
pub 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§
§impl AsRef<[u8]> for OwnedDirectUserIdentifier
impl AsRef<[u8]> for OwnedDirectUserIdentifier
§impl AsRef<DirectUserIdentifier> for OwnedDirectUserIdentifier
impl AsRef<DirectUserIdentifier> for OwnedDirectUserIdentifier
§fn as_ref(&self) -> &DirectUserIdentifier
fn as_ref(&self) -> &DirectUserIdentifier
Converts this type into a shared reference of the (usually inferred) input type.
§impl AsRef<str> for OwnedDirectUserIdentifier
impl AsRef<str> for OwnedDirectUserIdentifier
§impl Borrow<DirectUserIdentifier> for OwnedDirectUserIdentifier
impl Borrow<DirectUserIdentifier> for OwnedDirectUserIdentifier
§fn borrow(&self) -> &DirectUserIdentifier
fn borrow(&self) -> &DirectUserIdentifier
Immutably borrows from an owned value. Read more
§impl Clone for OwnedDirectUserIdentifier
impl Clone for OwnedDirectUserIdentifier
§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 more§impl Debug for OwnedDirectUserIdentifier
impl Debug for OwnedDirectUserIdentifier
§impl Deref for OwnedDirectUserIdentifier
impl Deref for OwnedDirectUserIdentifier
§type Target = DirectUserIdentifier
type Target = DirectUserIdentifier
The resulting type after dereferencing.
§fn deref(&self) -> &<OwnedDirectUserIdentifier as Deref>::Target
fn deref(&self) -> &<OwnedDirectUserIdentifier as Deref>::Target
Dereferences the value.
§impl<'de> Deserialize<'de> for OwnedDirectUserIdentifier
impl<'de> Deserialize<'de> for OwnedDirectUserIdentifier
§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
§impl Display for OwnedDirectUserIdentifier
impl Display for OwnedDirectUserIdentifier
§impl From<&DirectUserIdentifier> for OwnedDirectUserIdentifier
impl From<&DirectUserIdentifier> for OwnedDirectUserIdentifier
§fn from(id: &DirectUserIdentifier) -> OwnedDirectUserIdentifier
fn from(id: &DirectUserIdentifier) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
§impl From<&OwnedUserId> for OwnedDirectUserIdentifier
impl From<&OwnedUserId> for OwnedDirectUserIdentifier
§fn from(value: &OwnedUserId) -> OwnedDirectUserIdentifier
fn from(value: &OwnedUserId) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
§impl From<&UserId> for OwnedDirectUserIdentifier
impl From<&UserId> for OwnedDirectUserIdentifier
§fn from(value: &UserId) -> OwnedDirectUserIdentifier
fn from(value: &UserId) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
§impl From<&str> for OwnedDirectUserIdentifier
impl From<&str> for OwnedDirectUserIdentifier
§fn from(s: &str) -> OwnedDirectUserIdentifier
fn from(s: &str) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
§impl From<Arc<DirectUserIdentifier>> for OwnedDirectUserIdentifier
impl From<Arc<DirectUserIdentifier>> for OwnedDirectUserIdentifier
§fn from(a: Arc<DirectUserIdentifier>) -> OwnedDirectUserIdentifier
fn from(a: Arc<DirectUserIdentifier>) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
§impl From<Box<DirectUserIdentifier>> for OwnedDirectUserIdentifier
impl From<Box<DirectUserIdentifier>> for OwnedDirectUserIdentifier
§fn from(b: Box<DirectUserIdentifier>) -> OwnedDirectUserIdentifier
fn from(b: Box<DirectUserIdentifier>) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
§impl From<Box<str>> for OwnedDirectUserIdentifier
impl From<Box<str>> for OwnedDirectUserIdentifier
§fn from(s: Box<str>) -> OwnedDirectUserIdentifier
fn from(s: Box<str>) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
§impl From<OwnedDirectUserIdentifier> for Arc<DirectUserIdentifier>
impl From<OwnedDirectUserIdentifier> for Arc<DirectUserIdentifier>
§fn from(a: OwnedDirectUserIdentifier) -> Arc<DirectUserIdentifier>
fn from(a: OwnedDirectUserIdentifier) -> Arc<DirectUserIdentifier>
Converts to this type from the input type.
§impl From<OwnedDirectUserIdentifier> for Box<DirectUserIdentifier>
impl From<OwnedDirectUserIdentifier> for Box<DirectUserIdentifier>
§fn from(a: OwnedDirectUserIdentifier) -> Box<DirectUserIdentifier>
fn from(a: OwnedDirectUserIdentifier) -> Box<DirectUserIdentifier>
Converts to this type from the input type.
§impl From<OwnedDirectUserIdentifier> for String
impl From<OwnedDirectUserIdentifier> for String
§fn from(id: OwnedDirectUserIdentifier) -> String
fn from(id: OwnedDirectUserIdentifier) -> String
Converts to this type from the input type.
§impl From<OwnedUserId> for OwnedDirectUserIdentifier
impl From<OwnedUserId> for OwnedDirectUserIdentifier
§fn from(value: OwnedUserId) -> OwnedDirectUserIdentifier
fn from(value: OwnedUserId) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
§impl From<String> for OwnedDirectUserIdentifier
impl From<String> for OwnedDirectUserIdentifier
§fn from(s: String) -> OwnedDirectUserIdentifier
fn from(s: String) -> OwnedDirectUserIdentifier
Converts to this type from the input type.
§impl Hash for OwnedDirectUserIdentifier
impl Hash for OwnedDirectUserIdentifier
§impl Ord for OwnedDirectUserIdentifier
impl Ord for OwnedDirectUserIdentifier
§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
§impl PartialEq<&UserId> for OwnedDirectUserIdentifier
impl PartialEq<&UserId> for OwnedDirectUserIdentifier
§impl PartialEq<&str> for OwnedDirectUserIdentifier
impl PartialEq<&str> for OwnedDirectUserIdentifier
§impl PartialEq<OwnedDirectUserIdentifier> for &UserId
impl PartialEq<OwnedDirectUserIdentifier> for &UserId
§impl PartialEq<OwnedDirectUserIdentifier> for &str
impl PartialEq<OwnedDirectUserIdentifier> for &str
§impl PartialEq<OwnedDirectUserIdentifier> for OwnedUserId
impl PartialEq<OwnedDirectUserIdentifier> for OwnedUserId
§impl PartialEq<OwnedDirectUserIdentifier> for String
impl PartialEq<OwnedDirectUserIdentifier> for String
§impl PartialEq<OwnedDirectUserIdentifier> for str
impl PartialEq<OwnedDirectUserIdentifier> for str
§impl PartialEq<OwnedUserId> for OwnedDirectUserIdentifier
impl PartialEq<OwnedUserId> for OwnedDirectUserIdentifier
§impl PartialEq<String> for OwnedDirectUserIdentifier
impl PartialEq<String> for OwnedDirectUserIdentifier
§impl PartialEq<str> for OwnedDirectUserIdentifier
impl PartialEq<str> for OwnedDirectUserIdentifier
§impl PartialEq for OwnedDirectUserIdentifier
impl PartialEq for OwnedDirectUserIdentifier
§impl PartialOrd for OwnedDirectUserIdentifier
impl PartialOrd for OwnedDirectUserIdentifier
§impl Serialize for OwnedDirectUserIdentifier
impl Serialize for OwnedDirectUserIdentifier
§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
§impl TryFrom<&OwnedDirectUserIdentifier> for OwnedUserId
impl TryFrom<&OwnedDirectUserIdentifier> for OwnedUserId
§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 TryFrom<OwnedDirectUserIdentifier> for OwnedUserId
impl TryFrom<OwnedDirectUserIdentifier> for OwnedUserId
§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
§impl<T> CompatExt for T
impl<T> CompatExt for T
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§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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreSource§impl<I> IntoResettable<String> for I
impl<I> IntoResettable<String> for I
Source§fn into_resettable(self) -> Resettable<String>
fn into_resettable(self) -> Resettable<String>
Convert to the intended resettable type
Source§impl<Ctx, T> MeasureWith<Ctx> for T
impl<Ctx, T> MeasureWith<Ctx> for T
Source§fn measure_with(&self, _ctx: &Ctx) -> usize
fn measure_with(&self, _ctx: &Ctx) -> usize
How large is
Self
, given the ctx
?