pub struct Stream {
Show 28 fields pub mime: Mime, pub codecs: Vec<String>, pub is_progressive: bool, pub includes_video_track: bool, pub includes_audio_track: bool, pub format_type: Option<FormatType>, pub approx_duration_ms: Option<u64>, pub audio_channels: Option<u8>, pub audio_quality: Option<AudioQuality>, pub audio_sample_rate: Option<u64>, pub average_bitrate: Option<u64>, pub bitrate: Option<u64>, pub color_info: Option<ColorInfo>, pub fps: u8, pub height: Option<u64>, pub high_replication: Option<bool>, pub index_range: Option<Range<u64>>, pub init_range: Option<Range<u64>>, pub is_otf: bool, pub itag: u64, pub last_modified: Option<DateTime<Utc>>, pub loudness_db: Option<f64>, pub projection_type: ProjectionType, pub quality: Quality, pub quality_label: Option<QualityLabel>, pub signature_cipher: SignatureCipher, pub width: Option<u64>, pub video_details: Arc<VideoDetails>, /* private fields */
}
Expand description

A downloadable video Stream, that contains all the important information.

Fields

mime: Mimecodecs: Vec<String>is_progressive: boolincludes_video_track: boolincludes_audio_track: boolformat_type: Option<FormatType>approx_duration_ms: Option<u64>audio_channels: Option<u8>audio_quality: Option<AudioQuality>audio_sample_rate: Option<u64>average_bitrate: Option<u64>bitrate: Option<u64>color_info: Option<ColorInfo>fps: u8height: Option<u64>high_replication: Option<bool>index_range: Option<Range<u64>>init_range: Option<Range<u64>>is_otf: boolitag: u64last_modified: Option<DateTime<Utc>>loudness_db: Option<f64>projection_type: ProjectionTypequality: Qualityquality_label: Option<QualityLabel>signature_cipher: SignatureCipherwidth: Option<u64>video_details: Arc<VideoDetails>

Implementations

Attempts to downloads the Streams resource. This will download the video to <video_id>.mp4 in the current working directory. Takes an Callback

Attempts to downloads the Streams resource. This will download the video to <video_id>.mp4 in the provided directory. Takes an Callback

Attempts to downloads the Streams resource. This will download the video to the provided file path. Takes an Callback

The content length of the video. If the content length was not included in the RawFormat, this method will make a HEAD request, to try to figure it out.

Errors:
  • When the content length was not included in the RawFormat, and the request fails.

Attempts to downloads the Streams resource. This will download the video to <video_id>.mp4 in the current working directory.

Attempts to downloads the Streams resource. This will download the video to <video_id>.mp4 in the provided directory.

Attempts to downloads the Streams resource. This will download the video to the provided file path.

A synchronous wrapper around Stream::download.

A synchronous wrapper around Stream::download_with_callback.

A synchronous wrapper around Stream::download_to_dir.

A synchronous wrapper around Stream::download_to_dir_with_callback.

A synchronous wrapper around Stream::download_to.

A synchronous wrapper around Stream::download_to_with_callback.

A synchronous wrapper around Stream::content_length.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. 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.

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

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more