pub struct CreateForumTopic {
pub chat_id: Recipient,
pub name: String,
pub icon_color: Option<Rgb>,
pub icon_custom_emoji_id: Option<CustomEmojiId>,
}Expand description
Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.
Fields§
§chat_id: RecipientUnique identifier for the target chat or username of the target channel (in the format @channelusername)
name: StringTopic name, 1-128 characters
icon_color: Option<Rgb>Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F). To construct color from these values use Rgb::from_u32
icon_custom_emoji_id: Option<CustomEmojiId>Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.
Implementations§
Trait Implementations§
Source§impl Clone for CreateForumTopic
impl Clone for CreateForumTopic
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateForumTopic
impl Debug for CreateForumTopic
Source§impl Hash for CreateForumTopic
impl Hash for CreateForumTopic
Source§impl PartialEq for CreateForumTopic
impl PartialEq for CreateForumTopic
Source§impl Payload for CreateForumTopic
impl Payload for CreateForumTopic
Source§type Output = ForumTopic
type Output = ForumTopic
Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
GetUpdates with
big timeout), the minimum timeout that should be used.Source§impl Serialize for CreateForumTopic
impl Serialize for CreateForumTopic
impl Eq for CreateForumTopic
impl StructuralPartialEq for CreateForumTopic
Auto Trait Implementations§
impl Freeze for CreateForumTopic
impl RefUnwindSafe for CreateForumTopic
impl Send for CreateForumTopic
impl Sync for CreateForumTopic
impl Unpin for CreateForumTopic
impl UnwindSafe for CreateForumTopic
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> CreateForumTopicSetters for Pwhere
P: HasPayload<Payload = CreateForumTopic>,
impl<P> CreateForumTopicSetters for Pwhere
P: HasPayload<Payload = CreateForumTopic>,
Source§fn icon_color(self, value: Rgb) -> Self
fn icon_color(self, value: Rgb) -> Self
icon_color field.Source§fn icon_custom_emoji_id(self, value: CustomEmojiId) -> Self
fn icon_custom_emoji_id(self, value: CustomEmojiId) -> Self
icon_custom_emoji_id field.Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
Source§fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
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>
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>
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