Struct matrix_sdk_base::ruma::VoipId
pub struct VoipId(/* private fields */);
Expand description
A VoIP identifier.
VoIP IDs in Matrix are opaque strings. This type is provided simply for its semantic value.
You can create one from a string (using VoipId::parse()
) but the recommended way is to
use VoipId::new()
to generate a random one. If that function is not available for you,
you need to activate this crate’s rand
Cargo feature.
Implementations§
§impl VoipId
impl VoipId
pub fn new() -> OwnedVoipId
Available on crate feature rand
only.
pub fn new() -> OwnedVoipId
rand
only.Creates a random VoIP identifier.
This will currently be a UUID without hyphens, but no guarantees are made about the structure of client secrets generated from this function.
Trait Implementations§
§impl AsRef<VoipId> for OwnedVoipId
impl AsRef<VoipId> for OwnedVoipId
§impl Borrow<VoipId> for OwnedVoipId
impl Borrow<VoipId> for OwnedVoipId
§impl<'de> Deserialize<'de> for Box<VoipId>
impl<'de> Deserialize<'de> for Box<VoipId>
§fn deserialize<D>(
deserializer: D
) -> Result<Box<VoipId>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Box<VoipId>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<&VoipId> for OwnedVoipId
impl From<&VoipId> for OwnedVoipId
§fn from(id: &VoipId) -> OwnedVoipId
fn from(id: &VoipId) -> OwnedVoipId
Converts to this type from the input type.
§impl From<OwnedVoipId> for Box<VoipId>
impl From<OwnedVoipId> for Box<VoipId>
§fn from(a: OwnedVoipId) -> Box<VoipId>
fn from(a: OwnedVoipId) -> Box<VoipId>
Converts to this type from the input type.
§impl PartialEq<&VoipId> for OwnedVoipId
impl PartialEq<&VoipId> for OwnedVoipId
§impl PartialEq<Box<VoipId>> for &VoipId
impl PartialEq<Box<VoipId>> for &VoipId
§impl PartialEq<Box<VoipId>> for VoipId
impl PartialEq<Box<VoipId>> for VoipId
§impl PartialEq<OwnedVoipId> for &VoipId
impl PartialEq<OwnedVoipId> for &VoipId
§fn eq(&self, other: &OwnedVoipId) -> bool
fn eq(&self, other: &OwnedVoipId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialEq<OwnedVoipId> for VoipId
impl PartialEq<OwnedVoipId> for VoipId
§fn eq(&self, other: &OwnedVoipId) -> bool
fn eq(&self, other: &OwnedVoipId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialEq<VoipId> for OwnedVoipId
impl PartialEq<VoipId> for OwnedVoipId
§impl PartialOrd for VoipId
impl PartialOrd for VoipId
§fn partial_cmp(&self, other: &VoipId) -> Option<Ordering>
fn partial_cmp(&self, other: &VoipId) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl Serialize for VoipId
impl Serialize for VoipId
§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 ToOwned for VoipId
impl ToOwned for VoipId
§type Owned = OwnedVoipId
type Owned = OwnedVoipId
The resulting type after obtaining ownership.
§fn to_owned(&self) -> <VoipId as ToOwned>::Owned
fn to_owned(&self) -> <VoipId as ToOwned>::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl Eq for VoipId
impl StructuralEq for VoipId
impl StructuralPartialEq for VoipId
Auto Trait Implementations§
impl RefUnwindSafe for VoipId
impl Send for VoipId
impl !Sized for VoipId
impl Sync for VoipId
impl Unpin for VoipId
impl UnwindSafe for VoipId
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.