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: Mime
codecs: Vec<String>
is_progressive: bool
includes_video_track: bool
includes_audio_track: bool
format_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: u8
height: Option<u64>
high_replication: Option<bool>
index_range: Option<Range<u64>>
init_range: Option<Range<u64>>
is_otf: bool
itag: u64
last_modified: DateTime<Utc>
loudness_db: Option<f64>
projection_type: ProjectionType
quality: Quality
quality_label: Option<QualityLabel>
signature_cipher: SignatureCipher
width: Option<u64>
video_details: Arc<VideoDetails>
Implementations
This is supported on crate features stream
and download
only.
stream
and download
only.This is supported on crate features stream
and download
only.
stream
and download
only.Attempts to downloads the Stream
s 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.
stream
and download
only.Attempts to downloads the Stream
s resource.
This will download the video to <video_id>.mp4 in the provided directory.
This is supported on crate features download
and blocking
and stream
only.
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.
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.
download
and blocking
and stream
only.A synchronous wrapper around Stream::download_to_dir
.
pub fn blocking_download_to_dir_with_callback<P: AsRef<Path>>(
&self,
dir: P,
callback: Callback
) -> Result<PathBuf>
This is supported on crate features download
and blocking
and stream
and callback
only.
pub fn blocking_download_to_dir_with_callback<P: AsRef<Path>>(
&self,
dir: P,
callback: Callback
) -> Result<PathBuf>
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.
download
and blocking
and stream
only.A synchronous wrapper around Stream::download_to
.
pub fn blocking_download_to_with_callback<P: AsRef<Path>>(
&self,
path: P,
callback: Callback
) -> Result<()>
This is supported on crate features download
and blocking
and stream
and callback
only.
pub fn blocking_download_to_with_callback<P: AsRef<Path>>(
&self,
path: P,
callback: Callback
) -> Result<()>
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.
download
and blocking
and stream
only.A synchronous wrapper around Stream::content_length
.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Stream
impl !UnwindSafe for Stream
Blanket Implementations
Mutably borrows from an owned value. Read more
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