Struct rustube::Stream [−][src]
pub struct Stream {}Show 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
impl Stream
[src]
impl Stream
[src]pub async fn download_with_callback(
&self,
callback: Callback
) -> Result<PathBuf>
[src]
This is supported on crate features stream
and callback
only.
pub async fn download_with_callback(
&self,
callback: Callback
) -> Result<PathBuf>
[src]stream
and callback
only.impl Stream
[src]
impl Stream
[src]pub async fn content_length(&self) -> Result<u64>
[src]
This is supported on crate features stream
and download
only.
pub async fn content_length(&self) -> Result<u64>
[src]stream
and download
only.pub async fn download(&self) -> Result<PathBuf>
[src]
This is supported on crate features stream
and download
only.
pub async fn download(&self) -> Result<PathBuf>
[src]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.
impl Stream
[src]
impl Stream
[src]pub fn blocking_download(&self) -> Result<PathBuf>
[src]
This is supported on crate features download
and blocking
and stream
only.
pub fn blocking_download(&self) -> Result<PathBuf>
[src]download
and blocking
and stream
only.A synchronous wrapper around Stream::download
.
pub fn blocking_download_with_callback(
&self,
callback: Callback
) -> Result<PathBuf>
[src]
This is supported on crate features download
and blocking
and stream
and callback
only.
pub fn blocking_download_with_callback(
&self,
callback: Callback
) -> Result<PathBuf>
[src]download
and blocking
and stream
and callback
only.A synchronous wrapper around Stream::download_with_callback
.
pub fn blocking_download_to_dir<P: AsRef<Path>>(
&self,
dir: P
) -> Result<PathBuf>
[src]
This is supported on crate features download
and blocking
and stream
only.
pub fn blocking_download_to_dir<P: AsRef<Path>>(
&self,
dir: P
) -> Result<PathBuf>
[src]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>
[src]
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>
[src]download
and blocking
and stream
and callback
only.A synchronous wrapper around Stream::download_to_dir_with_callback
.
pub fn blocking_download_to<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
This is supported on crate features download
and blocking
and stream
only.
pub fn blocking_download_to<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]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<()>
[src]
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<()>
[src]download
and blocking
and stream
and callback
only.A synchronous wrapper around Stream::download_to_with_callback
.
pub fn blocking_content_length(&self) -> Result<u64>
[src]
This is supported on crate features download
and blocking
and stream
only.
pub fn blocking_content_length(&self) -> Result<u64>
[src]download
and blocking
and stream
only.A synchronous wrapper around Stream::content_length
.
Trait Implementations
impl<'de> Deserialize<'de> for Stream
[src]
impl<'de> Deserialize<'de> for Stream
[src]stream
only.fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl !UnwindSafe for Stream
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,