pub enum PeerInfo {
User {
id: i64,
auth: Option<PeerAuth>,
bot: Option<bool>,
is_self: Option<bool>,
},
Chat {
id: i64,
},
Channel {
id: i64,
auth: Option<PeerAuth>,
kind: Option<ChannelKind>,
},
}Expand description
An exploded peer reference along with any known useful information about the peer.
Variants§
User
Fields
Chat
Fields
Channel
Fields
§
id: i64Bare channel identifier.
Note that the HTTP Bot API prefixes this identifier with -100 to signal that it is a channel,
but the true value used by Telegram’s API is always strictly-positive.
§
kind: Option<ChannelKind>Channel kind, useful to determine what the possible permissions on it are.
Implementations§
Trait Implementations§
Source§impl<'a> From<&'a ChannelForbidden> for PeerInfo
impl<'a> From<&'a ChannelForbidden> for PeerInfo
Source§fn from(channel: &'a ChannelForbidden) -> Self
fn from(channel: &'a ChannelForbidden) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a ChatForbidden> for PeerInfo
impl<'a> From<&'a ChatForbidden> for PeerInfo
Source§fn from(chat: &'a ChatForbidden) -> Self
fn from(chat: &'a ChatForbidden) -> Self
Converts to this type from the input type.
Source§impl From<ChannelForbidden> for PeerInfo
impl From<ChannelForbidden> for PeerInfo
Source§fn from(channel: ChannelForbidden) -> Self
fn from(channel: ChannelForbidden) -> Self
Converts to this type from the input type.
Source§impl From<ChatForbidden> for PeerInfo
impl From<ChatForbidden> for PeerInfo
Source§fn from(chat: ChatForbidden) -> Self
fn from(chat: ChatForbidden) -> Self
Converts to this type from the input type.
impl Eq for PeerInfo
impl StructuralPartialEq for PeerInfo
Auto Trait Implementations§
impl Freeze for PeerInfo
impl RefUnwindSafe for PeerInfo
impl Send for PeerInfo
impl Sync for PeerInfo
impl Unpin for PeerInfo
impl UnsafeUnpin for PeerInfo
impl UnwindSafe for PeerInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more