Struct threema_gateway::Capabilities[][src]

pub struct Capabilities {
    pub text: bool,
    pub image: bool,
    pub video: bool,
    pub audio: bool,
    pub file: bool,
    pub other: Vec<String>,
}

A struct containing flags according to the capabilities of a Threema ID.

Fields

text: bool

Whether the ID can receive text messages.

image: bool

Whether the ID can receive image messages.

video: bool

Whether the ID can receive video messages.

audio: bool

Whether the ID can receive audio messages.

file: bool

Whether the ID can receive file messages.

other: Vec<String>

List of other capabilities this ID has.

Implementations

impl Capabilities[src]

pub fn can(&self, capability: &str) -> bool[src]

Return whether the specified capability is present.

Trait Implementations

impl Debug for Capabilities[src]

impl Display for Capabilities[src]

impl FromStr for Capabilities[src]

type Err = ApiError

The associated error which can be returned from parsing.

impl PartialEq<Capabilities> for Capabilities[src]

impl StructuralPartialEq for Capabilities[src]

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> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.