Struct carapax::types::MessageDataChatShared
source · pub struct MessageDataChatShared {
pub chat_id: i64,
pub request_id: i64,
pub photo: Option<Vec<PhotoSize>>,
pub title: Option<String>,
pub username: Option<String>,
}
Expand description
Represents an information about the chat
whose identifier was shared with the bot
using a crate::types::KeyboardButtonRequestChat
button.
Fields§
§chat_id: i64
Identifier of the shared chat.
The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
request_id: i64
Identifier of the request.
photo: Option<Vec<PhotoSize>>
Available sizes of the chat photo, if the photo was requested by the bot.
title: Option<String>
Title of the chat, if the title was requested by the bot.
username: Option<String>
Username of the chat, if the username was requested by the bot and available.
Implementations§
sourcepub fn new(chat_id: i64, request_id: i64) -> MessageDataChatShared
pub fn new(chat_id: i64, request_id: i64) -> MessageDataChatShared
Creates a new MessageDataChatShared
.
§Arguments
chat_id
- Identifier of the shared chat.request_id
- Identifier of the request.
sourcepub fn with_photo<T>(self, value: T) -> MessageDataChatSharedwhere
T: IntoIterator<Item = PhotoSize>,
pub fn with_photo<T>(self, value: T) -> MessageDataChatSharedwhere
T: IntoIterator<Item = PhotoSize>,
sourcepub fn with_title<T>(self, value: T) -> MessageDataChatShared
pub fn with_title<T>(self, value: T) -> MessageDataChatShared
sourcepub fn with_username<T>(self, value: T) -> MessageDataChatShared
pub fn with_username<T>(self, value: T) -> MessageDataChatShared
Trait Implementations§
source§fn clone(&self) -> MessageDataChatShared
fn clone(&self) -> MessageDataChatShared
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§fn deserialize<__D>(
__deserializer: __D
) -> Result<MessageDataChatShared, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<MessageDataChatShared, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§fn eq(&self, other: &MessageDataChatShared) -> bool
fn eq(&self, other: &MessageDataChatShared) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§fn partial_cmp(&self, other: &MessageDataChatShared) -> Option<Ordering>
fn partial_cmp(&self, other: &MessageDataChatShared) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§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
Auto Trait Implementations§
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