Struct tgbot::types::SendVideoNote

source ·
pub struct SendVideoNote { /* private fields */ }
Expand description

Sends a video message.

As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.

Implementations§

source§

impl SendVideoNote

source

pub fn new<A, B>(chat_id: A, video_note: B) -> Self
where A: Into<ChatId>, B: Into<InputFile>,

Creates a new SendVideoNote.

§Arguments
  • chat_id - Unique identifier of the target chat.
  • video_note - Video note to send.
source

pub fn with_business_connection_id<T>(self, value: T) -> Self
where T: Into<String>,

Sets a new business connection ID.

§Arguments
  • value - Unique identifier of the business connection.
source

pub fn with_disable_notification(self, value: bool) -> Self

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.
source

pub fn with_duration(self, value: Integer) -> Self

Sets a new duration.

§Arguments
  • value - Duration in seconds.
source

pub fn with_length(self, value: Integer) -> Self

Sets a new length.

§Arguments
  • value - Video width and height, i.e. diameter of the video message.
source

pub fn with_message_thread_id(self, value: Integer) -> Self

Sets a new message thread ID.

§Arguments
  • value - Unique identifier of the target message thread; supergroups only.
source

pub fn with_protect_content(self, value: bool) -> Self

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.
source

pub fn with_reply_markup<T>(self, value: T) -> Result<Self, ReplyMarkupError>
where T: Into<ReplyMarkup>,

Sets a new reply markup.

§Arguments
  • value - Reply markup.
source

pub fn with_reply_parameters( self, value: ReplyParameters ) -> Result<Self, ReplyParametersError>

Sets new reply parameters.

§Arguments
  • value - Description of the message to reply to.
source

pub fn with_thumbnail<T>(self, value: T) -> Result<Self, SendVideoNoteError>
where T: Into<InputFile>,

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.

Trait Implementations§

source§

impl Debug for SendVideoNote

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Method for SendVideoNote

§

type Response = Message

The type representing a successful result in an API response.
source§

fn into_payload(self) -> Payload

Converts the method into a payload for an HTTP request.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,