[][src]Struct egg_mode::media::MediaHandle

pub struct MediaHandle {
    pub id: MediaId,
    pub expires_at: Instant,
    pub progress: Option<ProgressInfo>,
}

A handle representing uploaded media.

Fields

id: MediaId

ID that can be used in API calls (e.g. to attach media to tweet).

expires_at: Instant

Number of second the media can be used in other API calls.

progress: Option<ProgressInfo>

Progress information. If present determines whether RawMedia can be used.

Methods

impl MediaHandle[src]

pub fn is_valid(&self) -> bool[src]

Media uploads expire after a certain amount of time This method returns true if the upload is still valid and can therefore e.g. be attached to a tweet

Trait Implementations

impl Clone for MediaHandle[src]

impl Debug for MediaHandle[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,