Struct rustube::Stream[][src]

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: 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>, // some fields omitted
}
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: DateTime<Utc>loudness_db: Option<f64>projection_type: ProjectionTypequality: Qualityquality_label: Option<QualityLabel>signature_cipher: SignatureCipherwidth: Option<u64>video_details: Arc<VideoDetails>

Implementations

This is supported on crate features stream and callback only.

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

This is supported on crate features stream and callback only.

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

This is supported on crate features stream and callback only.

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

This is supported on crate features stream and download only.

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.
This is supported on crate features stream and download only.

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

This is supported on crate features stream and download only.

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

This is supported on crate features stream and download only.

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

This is supported on crate features download and blocking and stream only.

A synchronous wrapper around Stream::download.

This is supported on crate features download and blocking and stream and callback only.

A synchronous wrapper around Stream::download_with_callback.

This is supported on crate features download and blocking and stream only.

A synchronous wrapper around Stream::download_to_dir.

This is supported on crate features download and blocking and stream and callback only.

A synchronous wrapper around Stream::download_to_dir_with_callback.

This is supported on crate features download and blocking and stream only.

A synchronous wrapper around Stream::download_to.

This is supported on crate features download and blocking and stream and callback only.

A synchronous wrapper around Stream::download_to_with_callback.

This is supported on crate features download and blocking and stream only.

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 !=.

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

Performs the conversion.

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

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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