pub struct SendDocument<'src> {
pub chat_id: ChatId,
pub document: InputFile<'src>,
pub caption: Cow<'src, str>,
pub parse_mode: Option<ParseMode>,
pub reply_to_message_id: Option<MessageId>,
pub reply_markup: ReplyMarkup<'src>,
/* private fields */
}Expand description
§Warning
If the input document is a stream, attempting to clone this object or turn it into a future
via crate::Request::to_future will result in a panic
Fields§
§chat_id: ChatId§document: InputFile<'src>§caption: Cow<'src, str>§parse_mode: Option<ParseMode>§reply_to_message_id: Option<MessageId>§reply_markup: ReplyMarkup<'src>Implementations§
Source§impl<'src> SendDocument<'src>
impl<'src> SendDocument<'src>
pub fn chat_id(self, chat_id: ChatId) -> Self
pub fn document(self, document: InputFile<'src>) -> Self
pub fn caption(self, caption: impl Into<Cow<'src, str>>) -> Self
pub fn parse_mode(self, parse_mode: impl Into<Option<ParseMode>>) -> Self
pub fn reply_to_message_id( self, reply_to_message_id: impl Into<Option<MessageId>>, ) -> Self
pub fn reply_markup(self, reply_markup: impl Into<ReplyMarkup<'src>>) -> Self
Trait Implementations§
Source§impl<'src> Clone for SendDocument<'src>
impl<'src> Clone for SendDocument<'src>
Source§fn clone(&self) -> SendDocument<'src>
fn clone(&self) -> SendDocument<'src>
Returns a duplicate 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§impl<'src> Debug for SendDocument<'src>
impl<'src> Debug for SendDocument<'src>
Source§impl<'src> IntoFuture for SendDocument<'src>
impl<'src> IntoFuture for SendDocument<'src>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <SendDocument<'src> as IntoFuture>::Output> + Sync + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <SendDocument<'src> as IntoFuture>::Output> + Sync + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Source§impl<'src> Request for SendDocument<'src>
impl<'src> Request for SendDocument<'src>
Auto Trait Implementations§
impl<'src> !Freeze for SendDocument<'src>
impl<'src> !RefUnwindSafe for SendDocument<'src>
impl<'src> Send for SendDocument<'src>
impl<'src> Sync for SendDocument<'src>
impl<'src> Unpin for SendDocument<'src>
impl<'src> !UnwindSafe for SendDocument<'src>
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