pub struct DownloadSession { /* private fields */ }Expand description
A planned download session.
Implementations§
Source§impl DownloadSession
impl DownloadSession
Sourcepub fn new(request: DownloadRequest) -> Self
pub fn new(request: DownloadRequest) -> Self
Creates a new planned session.
Sourcepub fn request(&self) -> &DownloadRequest
pub fn request(&self) -> &DownloadRequest
Returns the original request.
Sourcepub fn state(&self) -> SessionState
pub fn state(&self) -> SessionState
Returns current session state.
Sourcepub async fn start(self) -> Result<Vec<ProgressEvent>>
pub async fn start(self) -> Result<Vec<ProgressEvent>>
Starts the session.
Trait Implementations§
Source§impl Clone for DownloadSession
impl Clone for DownloadSession
Source§fn clone(&self) -> DownloadSession
fn clone(&self) -> DownloadSession
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 DownloadSession
impl !UnwindSafe for DownloadSession
impl Freeze for DownloadSession
impl Send for DownloadSession
impl Sync for DownloadSession
impl Unpin for DownloadSession
impl UnsafeUnpin for DownloadSession
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