pub struct InputPaidMediaVideo {
pub media: InputFile,
pub thumbnail: Option<InputFile>,
pub cover: Option<InputFile>,
pub start_timestamp: Option<Seconds>,
pub width: Option<u16>,
pub height: Option<u16>,
pub duration: Option<Seconds>,
pub supports_streaming: Option<bool>,
}Expand description
The paid media to send is a video.
Fields§
§media: InputFileFile to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »
thumbnail: Option<InputFile>Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »
cover: Option<InputFile>Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name
start_timestamp: Option<Seconds>Start timestamp for the video in the message
width: Option<u16>Video width.
height: Option<u16>Video height.
duration: Option<Seconds>Video duration in seconds.
supports_streaming: Option<bool>Pass true, if the uploaded video is suitable for streaming.
Implementations§
Source§impl InputPaidMediaVideo
impl InputPaidMediaVideo
pub const fn new(media: InputFile) -> InputPaidMediaVideo
pub fn media(self, val: InputFile) -> InputPaidMediaVideo
pub fn thumbnail(self, val: InputFile) -> InputPaidMediaVideo
pub fn cover(self, val: InputFile) -> InputPaidMediaVideo
pub fn start_timestamp(self, val: Seconds) -> InputPaidMediaVideo
pub const fn width(self, val: u16) -> InputPaidMediaVideo
pub const fn height(self, val: u16) -> InputPaidMediaVideo
pub const fn duration(self, val: Seconds) -> InputPaidMediaVideo
pub const fn supports_streaming(self, val: bool) -> InputPaidMediaVideo
Trait Implementations§
Source§impl Clone for InputPaidMediaVideo
impl Clone for InputPaidMediaVideo
Source§fn clone(&self) -> InputPaidMediaVideo
fn clone(&self) -> InputPaidMediaVideo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InputPaidMediaVideo
impl Debug for InputPaidMediaVideo
Source§impl Serialize for InputPaidMediaVideo
impl Serialize for InputPaidMediaVideo
Source§fn 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,
Auto Trait Implementations§
impl !Freeze for InputPaidMediaVideo
impl !RefUnwindSafe for InputPaidMediaVideo
impl Send for InputPaidMediaVideo
impl Sync for InputPaidMediaVideo
impl Unpin for InputPaidMediaVideo
impl !UnwindSafe for InputPaidMediaVideo
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<T> Erasable for T
impl<T> Erasable for T
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