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.
Methods
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]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Capabilities
[src]
fn eq(&self, __arg_0: &Capabilities) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Capabilities) -> bool
[src]
This method tests for !=
.
impl FromStr for Capabilities
[src]
type Err = ApiError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
Parses a string s
to return a value of this type. Read more