pub enum ChannelKind {
Broadcast = 1,
Megagroup = 2,
Gigagroup = 3,
}Expand description
Additional information about a PeerInfo::Channel.
A non-zero enum,
to make working with Option<ChannelKind>
and Result<ChannelKind, ()>
slightly more performant.
(See core::option’s documentation about the “null pointer optimization”.)
Variants§
Broadcast = 1
Value used for a channel with its tl::types::Channel::broadcast flag set to true.
Megagroup = 2
Value used for a channel with its tl::types::Channel::megagroup flag set to true.
Gigagroup = 3
Value used for a channel with its tl::types::Channel::gigagroup flag set to true.
Trait Implementations§
Source§impl Clone for ChannelKind
impl Clone for ChannelKind
Source§fn clone(&self) -> ChannelKind
fn clone(&self) -> ChannelKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelKind
impl Debug for ChannelKind
Source§impl PartialEq for ChannelKind
impl PartialEq for ChannelKind
Source§impl<'a> TryFrom<&'a Channel> for ChannelKind
impl<'a> TryFrom<&'a Channel> for ChannelKind
Source§impl<'a> TryFrom<&'a ChannelForbidden> for ChannelKind
impl<'a> TryFrom<&'a ChannelForbidden> for ChannelKind
Source§impl TryFrom<Channel> for ChannelKind
impl TryFrom<Channel> for ChannelKind
Source§impl TryFrom<ChannelForbidden> for ChannelKind
impl TryFrom<ChannelForbidden> for ChannelKind
Source§type Error = <ChannelKind as TryFrom<&'static ChannelForbidden>>::Error
type Error = <ChannelKind as TryFrom<&'static ChannelForbidden>>::Error
The type returned in the event of a conversion error.
impl Copy for ChannelKind
impl Eq for ChannelKind
impl StructuralPartialEq for ChannelKind
Auto Trait Implementations§
impl Freeze for ChannelKind
impl RefUnwindSafe for ChannelKind
impl Send for ChannelKind
impl Sync for ChannelKind
impl Unpin for ChannelKind
impl UnsafeUnpin for ChannelKind
impl UnwindSafe for ChannelKind
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