pub struct SendVideo { /* private fields */ }
Expand description
Sends a video file.
Telegram clients support mp4 videos (other formats may be sent as Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
Implementations§
source§impl SendVideo
impl SendVideo
sourcepub fn new<A, B>(chat_id: A, video: B) -> SendVideo
pub fn new<A, B>(chat_id: A, video: B) -> SendVideo
Creates a new SendVideo
.
§Arguments
chat_id
- Unique identifier of the target chat.video
- Video to send.
sourcepub fn with_business_connection_id<T>(self, value: T) -> SendVideo
pub fn with_business_connection_id<T>(self, value: T) -> SendVideo
Sets a new caption.
§Arguments
value
- Caption; 0-1024 characters.
May also be used when resending documents by file_id
.
sourcepub fn with_disable_notification(self, value: bool) -> SendVideo
pub fn with_disable_notification(self, value: bool) -> SendVideo
Sets a new value for a disable_notification
flag.
§Arguments
value
- Indicates whether to send the message silently or not; a user will receive a notification without sound.
sourcepub fn with_duration(self, value: i64) -> SendVideo
pub fn with_duration(self, value: i64) -> SendVideo
sourcepub fn with_has_spoiler(self, value: bool) -> SendVideo
pub fn with_has_spoiler(self, value: bool) -> SendVideo
Sets a new value for a has_spoiler
flag.
§Arguments
value
- Indicates whether to cover with a spoiler animation.
sourcepub fn with_height(self, value: i64) -> SendVideo
pub fn with_height(self, value: i64) -> SendVideo
sourcepub fn with_message_thread_id(self, value: i64) -> SendVideo
pub fn with_message_thread_id(self, value: i64) -> SendVideo
Sets a new message thread ID.
§Arguments
value
- Unique identifier of the target message thread; supergroups only.
sourcepub fn with_protect_content(self, value: bool) -> SendVideo
pub fn with_protect_content(self, value: bool) -> SendVideo
Sets a new value for a protect_content
flag.
§Arguments
value
- Indicates whether to protect the contents of the sent message from forwarding and saving.
sourcepub fn with_reply_markup<T>(
self,
value: T
) -> Result<SendVideo, ReplyMarkupError>where
T: Into<ReplyMarkup>,
pub fn with_reply_markup<T>(
self,
value: T
) -> Result<SendVideo, ReplyMarkupError>where
T: Into<ReplyMarkup>,
sourcepub fn with_reply_parameters(
self,
value: ReplyParameters
) -> Result<SendVideo, ReplyParametersError>
pub fn with_reply_parameters( self, value: ReplyParameters ) -> Result<SendVideo, ReplyParametersError>
sourcepub fn with_supports_streaming(self, value: bool) -> SendVideo
pub fn with_supports_streaming(self, value: bool) -> SendVideo
Sets a new value for a supports_streaming
flag.
§Arguments
value
- Indicates whether the uploaded video is suitable for streaming.
sourcepub fn with_thumbnail<T>(self, value: T) -> Result<SendVideo, SendVideoError>
pub fn with_thumbnail<T>(self, value: T) -> Result<SendVideo, SendVideoError>
Sets a new thumbnail.
§Arguments
value
- Thumbnail.
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.
sourcepub fn with_width(self, value: i64) -> SendVideo
pub fn with_width(self, value: i64) -> SendVideo
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SendVideo
impl !RefUnwindSafe for SendVideo
impl Send for SendVideo
impl Sync for SendVideo
impl Unpin for SendVideo
impl !UnwindSafe for SendVideo
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> 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