Enum threema_gateway::Recipient[][src]

pub enum Recipient<'a> {
    Id(Cow<'a, str>),
    Phone(Cow<'a, str>),
    Email(Cow<'a, str>),
}

Different ways to specify a message recipient in basic mode.

Variants

Id(Cow<'a, str>)

Recipient identity (8 characters)

Phone(Cow<'a, str>)

Recipient phone number (E.164), without leading +

Email(Cow<'a, str>)

Recipient e-mail address

Implementations

impl<'a> Recipient<'a>[src]

pub fn new_id<T: Into<Cow<'a, str>>>(id: T) -> Self[src]

pub fn new_phone<T: Into<Cow<'a, str>>>(phone: T) -> Self[src]

pub fn new_email<T: Into<Cow<'a, str>>>(email: T) -> Self[src]

Trait Implementations

impl<'a> Debug for Recipient<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Recipient<'a>

impl<'a> Send for Recipient<'a>

impl<'a> Sync for Recipient<'a>

impl<'a> Unpin for Recipient<'a>

impl<'a> UnwindSafe for Recipient<'a>

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, 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.