pub struct DownloadRequest {
pub input: String,
pub options: DownloadOptions,
pub stream_selector: StreamSelector,
pub cancellation_token: CancellationToken,
pub progress_callback: Option<ProgressCallback>,
}Expand description
API request for a download or recording session.
Fields§
§input: StringManifest URL, local path, or direct media URL.
options: DownloadOptionsTyped options.
stream_selector: StreamSelectorStream selection strategy.
cancellation_token: CancellationTokenCancellation token observed by the session.
progress_callback: Option<ProgressCallback>Optional live progress callback invoked as events are emitted.
Implementations§
Source§impl DownloadRequest
impl DownloadRequest
Sourcepub fn with_options(self, options: DownloadOptions) -> Self
pub fn with_options(self, options: DownloadOptions) -> Self
Replaces the request options.
Sourcepub fn with_stream_selector(self, stream_selector: StreamSelector) -> Self
pub fn with_stream_selector(self, stream_selector: StreamSelector) -> Self
Replaces the stream selector.
Sourcepub fn with_cancellation_token(
self,
cancellation_token: CancellationToken,
) -> Self
pub fn with_cancellation_token( self, cancellation_token: CancellationToken, ) -> Self
Replaces the cancellation token.
Sourcepub fn with_progress_callback(self, progress_callback: ProgressCallback) -> Self
pub fn with_progress_callback(self, progress_callback: ProgressCallback) -> Self
Replaces the structured live progress callback.
Trait Implementations§
Source§impl Clone for DownloadRequest
impl Clone for DownloadRequest
Source§fn clone(&self) -> DownloadRequest
fn clone(&self) -> DownloadRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DownloadRequest
impl !UnwindSafe for DownloadRequest
impl Freeze for DownloadRequest
impl Send for DownloadRequest
impl Sync for DownloadRequest
impl Unpin for DownloadRequest
impl UnsafeUnpin for DownloadRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more