Struct teloxide::payloads::UnpinChatMessage
source · [−]Expand description
Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in a supergroup or ‘can_edit_messages’ admin right in a channel. Returns True on success.
Fields
chat_id: RecipientUnique identifier for the target chat or username of the target channel (in the format @channelusername)
message_id: Option<MessageId>Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.
Implementations
sourceimpl UnpinChatMessage
impl UnpinChatMessage
pub fn new(chat_id: impl Into<Recipient>) -> UnpinChatMessageⓘNotable traits for UnpinChatMessageimpl Payload for UnpinChatMessage type Output = True;
Trait Implementations
sourceimpl Clone for UnpinChatMessage
impl Clone for UnpinChatMessage
sourcefn clone(&self) -> UnpinChatMessageⓘNotable traits for UnpinChatMessageimpl Payload for UnpinChatMessage type Output = True;
fn clone(&self) -> UnpinChatMessageⓘNotable traits for UnpinChatMessageimpl Payload for UnpinChatMessage type Output = True;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for UnpinChatMessage
impl Debug for UnpinChatMessage
sourceimpl Hash for UnpinChatMessage
impl Hash for UnpinChatMessage
sourceimpl PartialEq<UnpinChatMessage> for UnpinChatMessage
impl PartialEq<UnpinChatMessage> for UnpinChatMessage
sourcefn eq(&self, other: &UnpinChatMessage) -> bool
fn eq(&self, other: &UnpinChatMessage) -> bool
sourceimpl Payload for UnpinChatMessage
impl Payload for UnpinChatMessage
sourcefn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates with
big timeout), the minimum timeout that should be used. Read moresourceimpl Serialize for UnpinChatMessage
impl Serialize for UnpinChatMessage
sourcefn 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 Eq for UnpinChatMessage
impl StructuralEq for UnpinChatMessage
impl StructuralPartialEq for UnpinChatMessage
Auto Trait Implementations
impl RefUnwindSafe for UnpinChatMessage
impl Send for UnpinChatMessage
impl Sync for UnpinChatMessage
impl Unpin for UnpinChatMessage
impl UnwindSafe for UnpinChatMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> Erasable for T
impl<T> Erasable for T
sourceimpl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
type Payload = P
type Payload = P
The type of the payload contained.
sourcefn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Gain mutable access to the underlying payload.
sourcefn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
Gain immutable access to the underlying payload.
sourcefn with_payload_mut<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut Self::Payload),
fn with_payload_mut<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut Self::Payload),
Update payload with a function
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<P> UnpinChatMessageSetters for Pwhere
P: HasPayload<Payload = UnpinChatMessage>,
impl<P> UnpinChatMessageSetters for Pwhere
P: HasPayload<Payload = UnpinChatMessage>,
sourcefn message_id(self, value: MessageId) -> Self
fn message_id(self, value: MessageId) -> Self
Setter for
message_id field.