pub struct Channel {
pub raw: Channel,
}Expand description
Wrapper around a Telegram channel or supergroup (tl::types::Channel).
Fields§
§raw: ChannelImplementations§
Source§impl Channel
impl Channel
Sourcepub fn from_raw(raw: Chat) -> Option<Self>
pub fn from_raw(raw: Chat) -> Option<Self>
Wrap from a raw tl::enums::Chat, returning None if it is not a channel.
Sourcepub fn access_hash(&self) -> Option<i64>
pub fn access_hash(&self) -> Option<i64>
Access hash.
Sourcepub fn restricted(&self) -> bool
pub fn restricted(&self) -> bool
true if the channel is restricted.
Sourcepub fn signatures(&self) -> bool
pub fn signatures(&self) -> bool
true if the channel has signatures on posts.
Sourcepub fn participants_count(&self) -> Option<i32>
pub fn participants_count(&self) -> Option<i32>
Approximate member count (may be None for private channels).
Sourcepub fn as_input_peer(&self) -> InputPeer
pub fn as_input_peer(&self) -> InputPeer
Convert to an InputPeer (requires access hash).
Sourcepub fn as_input_channel(&self) -> InputChannel
pub fn as_input_channel(&self) -> InputChannel
Convert to an InputChannel for channel-specific RPCs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnsafeUnpin for Channel
impl UnwindSafe for Channel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more