[][src]Struct ruma_identifiers::DeviceId

#[repr(transparent)]pub struct DeviceId(_);

A Matrix device ID.

Device identifiers in Matrix are completely opaque character sequences. This type alias is provided simply for its semantic value.

Implementations

impl DeviceId[src]

pub fn new() -> Box<Self>[src]

This is supported on feature="rand" only.

Generates a random DeviceId, suitable for assignment to a new device.

pub fn as_str(&self) -> &str[src]

Creates a string slice from this DeviceId.

pub fn as_bytes(&self) -> &[u8][src]

Creates a byte slice from this DeviceId.

Trait Implementations

impl AsRef<str> for DeviceId[src]

impl Debug for DeviceId[src]

impl Display for DeviceId[src]

impl Eq for DeviceId[src]

impl<'_> From<&'_ DeviceId> for Box<DeviceId>[src]

impl<'a> From<&'a str> for &'a DeviceId[src]

impl Hash for DeviceId[src]

impl Ord for DeviceId[src]

impl<'_> PartialEq<&'_ str> for DeviceId[src]

impl PartialEq<DeviceId> for DeviceId[src]

impl PartialEq<DeviceId> for str[src]

impl<'_> PartialEq<DeviceId> for &'_ str[src]

impl PartialEq<DeviceId> for String[src]

impl PartialEq<String> for DeviceId[src]

impl PartialEq<str> for DeviceId[src]

impl PartialOrd<DeviceId> for DeviceId[src]

impl Serialize for DeviceId[src]

impl StructuralEq for DeviceId[src]

impl StructuralPartialEq for DeviceId[src]

impl ToOwned for DeviceId[src]

type Owned = Box<DeviceId>

The resulting type after obtaining ownership.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]