Struct ruma_common::VoipId
source · [−]#[repr(transparent)]pub struct VoipId(_);
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
sourceimpl VoipId
impl VoipId
sourcepub 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
sourceimpl AsRef<VoipId> for OwnedVoipId
impl AsRef<VoipId> for OwnedVoipId
sourceimpl Borrow<VoipId> for OwnedVoipId
impl Borrow<VoipId> for OwnedVoipId
sourceimpl<'de> Deserialize<'de> for Box<VoipId>
impl<'de> Deserialize<'de> for Box<VoipId>
sourcefn 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
sourceimpl From<&VoipId> for OwnedVoipId
impl From<&VoipId> for OwnedVoipId
sourcefn from(id: &VoipId) -> OwnedVoipId
fn from(id: &VoipId) -> OwnedVoipId
Converts to this type from the input type.
sourceimpl From<OwnedVoipId> for Box<VoipId>
impl From<OwnedVoipId> for Box<VoipId>
sourcefn from(a: OwnedVoipId) -> Box<VoipId>
fn from(a: OwnedVoipId) -> Box<VoipId>
Converts to this type from the input type.
sourceimpl PartialEq<Box<VoipId, Global>> for &VoipId
impl PartialEq<Box<VoipId, Global>> for &VoipId
sourceimpl PartialEq<OwnedVoipId> for &VoipId
impl PartialEq<OwnedVoipId> for &VoipId
sourcefn eq(&self, other: &OwnedVoipId) -> bool
fn eq(&self, other: &OwnedVoipId) -> bool
sourceimpl PartialEq<OwnedVoipId> for Box<VoipId>
impl PartialEq<OwnedVoipId> for Box<VoipId>
sourcefn eq(&self, other: &OwnedVoipId) -> bool
fn eq(&self, other: &OwnedVoipId) -> bool
sourceimpl PartialEq<OwnedVoipId> for VoipId
impl PartialEq<OwnedVoipId> for VoipId
sourcefn eq(&self, other: &OwnedVoipId) -> bool
fn eq(&self, other: &OwnedVoipId) -> bool
sourceimpl PartialOrd<VoipId> for VoipId
impl PartialOrd<VoipId> for VoipId
sourcefn partial_cmp(&self, other: &VoipId) -> Option<Ordering>
fn partial_cmp(&self, other: &VoipId) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl ToOwned for VoipId
impl ToOwned for VoipId
type Owned = OwnedVoipId
type Owned = OwnedVoipId
The resulting type after obtaining ownership.
sourcefn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.