pub enum Recipient {
Id(ChatId),
ChannelUsername(String),
}
Expand description
A unique identifier for the target chat or username of the target channel
(in the format @channelusername
).
Variants§
Id(ChatId)
A chat identifier.
ChannelUsername(String)
A channel username (in the format @channelusername).
Trait Implementations§
source§impl<'de> Deserialize<'de> for Recipient
impl<'de> Deserialize<'de> for Recipient
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Recipient, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Recipient, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Recipient> for Recipient
impl PartialEq<Recipient> for Recipient
source§impl Serialize for Recipient
impl Serialize for Recipient
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Recipient
impl StructuralEq for Recipient
impl StructuralPartialEq for Recipient
Auto Trait Implementations§
impl RefUnwindSafe for Recipient
impl Send for Recipient
impl Sync for Recipient
impl Unpin for Recipient
impl UnwindSafe for Recipient
Blanket Implementations§
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.