Struct telers::methods::edit_forum_topic::EditForumTopic

source ·
pub struct EditForumTopic {
    pub chat_id: ChatIdKind,
    pub message_thread_id: i64,
    pub name: Option<String>,
    pub icon_custom_emoji_id: Option<String>,
}
Expand description

Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic.

§Documentation

https://core.telegram.org/bots/api#editforumtopic

§Returns

Returns true on success

Fields§

§chat_id: ChatIdKind

Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)

§message_thread_id: i64

Unique identifier for the target message thread of the forum topic

§name: Option<String>

New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept

§icon_custom_emoji_id: Option<String>

New unique identifier of the custom emoji shown as the topic icon. Use GetForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept.

Implementations§

source§

impl EditForumTopic

source

pub fn new(chat_id: impl Into<ChatIdKind>, message_thread_id: i64) -> Self

source

pub fn chat_id(self, val: impl Into<ChatIdKind>) -> Self

source

pub fn message_thread_id(self, val: i64) -> Self

source

pub fn name(self, val: impl Into<String>) -> Self

source

pub fn icon_custom_emoji_id(self, val: impl Into<String>) -> Self

source§

impl EditForumTopic

source

pub fn icon_custom_emoji_id_option(self, val: Option<impl Into<String>>) -> Self

Trait Implementations§

source§

impl AsRef<EditForumTopic> for EditForumTopic

source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for EditForumTopic

source§

fn clone(&self) -> EditForumTopic

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EditForumTopic

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for EditForumTopic

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for EditForumTopic

source§

fn eq(&self, other: &EditForumTopic) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EditForumTopic

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TelegramMethod for EditForumTopic

§

type Method = EditForumTopic

This type represents a method to Telegram API with data (params)
§

type Return = bool

This type represents a response from Telegram API, which is returned by the method
source§

fn build_request<Client>(&self, _bot: &Bot<Client>) -> Request<'_, Self::Method>

This method is called when a request is sent to Telegram API. It’s need for preparing a request to Telegram API.
source§

fn build_response(&self, content: &str) -> Result<Response<Self::Return>, Error>

This method is called when a response is received from Telegram API. It’s need for parsing a response from Telegram API. Read more
source§

impl Eq for EditForumTopic

source§

impl StructuralPartialEq for EditForumTopic

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more