Struct sunk::video::Video

source ·
pub struct Video {
    pub id: usize,
    pub title: String,
    pub album: Option<String>,
    pub size: usize,
    pub duration: usize,
    pub media_type: String,
    /* private fields */
}

Fields

id: usizetitle: Stringalbum: Option<String>size: usizeduration: usizemedia_type: String

Implementations

Returns the raw video captions.

Sets the size that the video will stream at, measured in pixels.

Sets the time (in seconds) that a stream will be offset by.

For example, to start playback at 1:40, use an offset of 100 seconds.

Can be used to implement video skipping.

Trait Implementations

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Returns whether or not the media has an associated cover.
Returns the cover ID associated with the media, if any. Read more
Returns the raw bytes of the cover art of the media. Read more
Returns the URL pointing to the cover art of the media. Read more
Returns the raw bytes of the media. Read more
Returns a constructed URL for streaming. Read more
Returns the raw bytes of the media. Read more
Returns a constructed URL for downloading the song.
Returns the default encoding of the media. Read more
Sets the maximum bitrate the media will use when streaming. Read more
Sets the transcoding format the media will use when streaming. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.