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

pub struct MediaHandle {
    pub id: u64,
    pub valid_until: Instant,
}

A media handle returned by twitter upon successful upload.

To get one of these, start with UploadBuilder. To use the id inside, see DraftTweet::media_ids.

Fields

id: u64

The ID that can be used to reference the media.

valid_until: Instant

The time after which the media will be rendered unusable in the twitter API.

Methods

impl MediaHandle[src]

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

Returns whether media is still valid to be used in API calls.

Under hood it is Instant::now() < handle.valid_until.

Trait Implementations

impl Clone for MediaHandle[src]

impl Copy 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>,