pub struct TransferTask { /* private fields */ }Expand description
Immutable task snapshot exposed to transfer executor implementations.
This type is constructed from the crate-internal scheduler task state and intentionally exposes read-only accessors.
Implementations§
Source§impl TransferTask
impl TransferTask
Sourcepub fn direction(&self) -> Direction
pub fn direction(&self) -> Direction
Returns transfer direction.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.direction();
}Sourcepub fn total_size(&self) -> u64
pub fn total_size(&self) -> u64
Returns total file size in bytes.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.total_size();
}Sourcepub fn chunk_size(&self) -> u64
pub fn chunk_size(&self) -> u64
Returns chunk size in bytes.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.chunk_size();
}Sourcepub fn file_sign(&self) -> &str
pub fn file_sign(&self) -> &str
Returns file signature.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.file_sign();
}Sourcepub fn file_name(&self) -> &str
pub fn file_name(&self) -> &str
Returns display file name.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.file_name();
}Sourcepub fn file_path(&self) -> &Path
pub fn file_path(&self) -> &Path
Returns local file path.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.file_path();
}Sourcepub fn url(&self) -> &str
pub fn url(&self) -> &str
Returns request URL.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.url();
}Sourcepub fn method(&self) -> Method
pub fn method(&self) -> Method
Returns request HTTP method.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.method();
}Sourcepub fn headers(&self) -> &HeaderMap
pub fn headers(&self) -> &HeaderMap
Returns base request headers.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.headers();
}Sourcepub fn breakpoint_download_http(&self) -> Option<&BreakpointDownloadHttpConfig>
pub fn breakpoint_download_http(&self) -> Option<&BreakpointDownloadHttpConfig>
Returns task-level breakpoint download HTTP configuration.
Custom crate::download_trait::BreakpointDownload implementations can
read values such as range_accept.
§Examples
use rusty_cat::api::TransferTask;
fn inspect(task: &TransferTask) {
let _ = task.breakpoint_download_http();
}Trait Implementations§
Source§impl Clone for TransferTask
impl Clone for TransferTask
Source§fn clone(&self) -> TransferTask
fn clone(&self) -> TransferTask
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 !Freeze for TransferTask
impl !RefUnwindSafe for TransferTask
impl Send for TransferTask
impl Sync for TransferTask
impl Unpin for TransferTask
impl UnsafeUnpin for TransferTask
impl !UnwindSafe for TransferTask
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