Struct tbot::types::input_file::Animation[][src]

pub struct Animation { /* fields omitted */ }

Represents an animation to be sent.


impl Animation[src]

pub fn with_bytes(bytes: impl Into<Vec<u8>>) -> Self[src]

Constructs an Animation from bytes.

pub fn with_id(id: Id) -> Self[src]

Constructs an Animation from a file ID.


Panics if the ID starts with attach://.

pub fn with_url(url: impl Into<String>) -> Self[src]

Constructs an Animation from an URL.


Panics if the URL starts with attach://.

pub fn thumb(self, thumb: Thumb) -> Self[src]

Configures thumb.

pub fn caption(self, caption: impl Into<Text>) -> Self[src]

Configures caption.

pub const fn duration(self, duration: u32) -> Self[src]

Configures duration.

pub const fn width(self, width: u32) -> Self[src]

Configures width.

pub const fn height(self, height: u32) -> Self[src]

Configures height.

Trait Implementations

impl Clone for Animation[src]

impl Debug for Animation[src]

impl From<Animation> for EditableMedia[src]

impl Hash for Animation[src]

impl PartialEq<Animation> for Animation[src]

impl Serialize for Animation[src]

impl Eq for Animation[src]

impl StructuralEq for Animation[src]

impl StructuralPartialEq for Animation[src]

Auto Trait Implementations

impl RefUnwindSafe for Animation

impl Send for Animation

impl Sync for Animation

impl Unpin for Animation

impl UnwindSafe for Animation

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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.