pub struct ForwardMessageRequest<'a> { /* private fields */ }Expand description
Use this method to forward messages of any kind. Service messages and messages with protected content can’t be forwarded. On success, the sent Message is returned.
Implementations§
Source§impl<'a> ForwardMessageRequest<'a>
impl<'a> ForwardMessageRequest<'a>
pub fn new( api: &'a API, chat_id: impl Into<ChatId>, from_chat_id: impl Into<ChatId>, message_id: impl Into<i64>, ) -> Self
Sourcepub fn chat_id(self, chat_id: impl Into<ChatId>) -> Self
pub fn chat_id(self, chat_id: impl Into<ChatId>) -> Self
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Sourcepub fn message_thread_id(self, message_thread_id: impl Into<i64>) -> Self
pub fn message_thread_id(self, message_thread_id: impl Into<i64>) -> Self
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
Sourcepub fn from_chat_id(self, from_chat_id: impl Into<ChatId>) -> Self
pub fn from_chat_id(self, from_chat_id: impl Into<ChatId>) -> Self
Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
Sourcepub fn disable_notification(self, disable_notification: impl Into<bool>) -> Self
pub fn disable_notification(self, disable_notification: impl Into<bool>) -> Self
Sends the message silently. Users will receive a notification with no sound.
Sourcepub fn protect_content(self, protect_content: impl Into<bool>) -> Self
pub fn protect_content(self, protect_content: impl Into<bool>) -> Self
Protects the contents of the forwarded message from forwarding and saving
Sourcepub fn message_id(self, message_id: impl Into<i64>) -> Self
pub fn message_id(self, message_id: impl Into<i64>) -> Self
Message identifier in the chat specified in from_chat_id
Trait Implementations§
Source§impl<'a> Clone for ForwardMessageRequest<'a>
impl<'a> Clone for ForwardMessageRequest<'a>
Source§fn clone(&self) -> ForwardMessageRequest<'a>
fn clone(&self) -> ForwardMessageRequest<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, 'b> IntoFuture for &'b ForwardMessageRequest<'a>
impl<'a, 'b> IntoFuture for &'b ForwardMessageRequest<'a>
Source§type IntoFuture = Pin<Box<dyn Future<Output = Result<<ForwardMessageRequest<'a> as RequestT>::ReturnType, ConogramError>> + Send + 'b>>
type IntoFuture = Pin<Box<dyn Future<Output = Result<<ForwardMessageRequest<'a> as RequestT>::ReturnType, ConogramError>> + Send + 'b>>
Which kind of future are we turning this into?
Source§type Output = <<&'b ForwardMessageRequest<'a> as IntoFuture>::IntoFuture as Future>::Output
type Output = <<&'b ForwardMessageRequest<'a> as IntoFuture>::IntoFuture as Future>::Output
The output that the future will produce on completion.
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Source§impl<'a> IntoFuture for ForwardMessageRequest<'a>
impl<'a> IntoFuture for ForwardMessageRequest<'a>
Source§type IntoFuture = Pin<Box<dyn Future<Output = Result<<ForwardMessageRequest<'a> as RequestT>::ReturnType, ConogramError>> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = Result<<ForwardMessageRequest<'a> as RequestT>::ReturnType, ConogramError>> + Send + 'a>>
Which kind of future are we turning this into?
Source§type Output = <<ForwardMessageRequest<'a> as IntoFuture>::IntoFuture as Future>::Output
type Output = <<ForwardMessageRequest<'a> as IntoFuture>::IntoFuture as Future>::Output
The output that the future will produce on completion.
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'a> Freeze for ForwardMessageRequest<'a>
impl<'a> !RefUnwindSafe for ForwardMessageRequest<'a>
impl<'a> Send for ForwardMessageRequest<'a>
impl<'a> Sync for ForwardMessageRequest<'a>
impl<'a> Unpin for ForwardMessageRequest<'a>
impl<'a> UnsafeUnpin for ForwardMessageRequest<'a>
impl<'a> !UnwindSafe for ForwardMessageRequest<'a>
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