Struct carapax::types::SupergroupChat
source · pub struct SupergroupChat {
pub id: ChatPeerId,
pub title: String,
pub is_forum: Option<bool>,
pub username: Option<ChatUsername>,
}
Expand description
Represents a supergroup chat.
Fields§
§id: ChatPeerId
Unique identifier of the supergroup.
title: String
Title of the supergroup.
is_forum: Option<bool>
Whether the supergroup has topic enabled.
username: Option<ChatUsername>
Username of the supergroup.
Implementations§
source§impl SupergroupChat
impl SupergroupChat
sourcepub fn new<A, B>(id: A, title: B) -> SupergroupChat
pub fn new<A, B>(id: A, title: B) -> SupergroupChat
Creates a new SupergroupChat
.
§Arguments
id
- Unique identifier of the supergroup.title
- Title of the supergroup.
sourcepub fn with_is_forum(self, value: bool) -> SupergroupChat
pub fn with_is_forum(self, value: bool) -> SupergroupChat
Sets a new value for an is_forum
flag.
§Arguments
value
- Whether the supergroup has topics enabled.
sourcepub fn with_username<T>(self, value: T) -> SupergroupChatwhere
T: Into<ChatUsername>,
pub fn with_username<T>(self, value: T) -> SupergroupChatwhere
T: Into<ChatUsername>,
Trait Implementations§
source§impl Clone for SupergroupChat
impl Clone for SupergroupChat
source§fn clone(&self) -> SupergroupChat
fn clone(&self) -> SupergroupChat
Returns a copy 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 SupergroupChat
impl Debug for SupergroupChat
source§impl<'de> Deserialize<'de> for SupergroupChat
impl<'de> Deserialize<'de> for SupergroupChat
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<SupergroupChat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<SupergroupChat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<SupergroupChat> for Chat
impl From<SupergroupChat> for Chat
source§fn from(original: SupergroupChat) -> Chat
fn from(original: SupergroupChat) -> Chat
Converts to this type from the input type.
source§impl PartialEq for SupergroupChat
impl PartialEq for SupergroupChat
source§fn eq(&self, other: &SupergroupChat) -> bool
fn eq(&self, other: &SupergroupChat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SupergroupChat
impl Serialize for SupergroupChat
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 StructuralPartialEq for SupergroupChat
Auto Trait Implementations§
impl Freeze for SupergroupChat
impl RefUnwindSafe for SupergroupChat
impl Send for SupergroupChat
impl Sync for SupergroupChat
impl Unpin for SupergroupChat
impl UnwindSafe for SupergroupChat
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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