pub struct PresignedRangeDownload { /* private fields */ }Expand description
Provider-neutral presigned range-download implementation.
Implementations§
Source§impl PresignedRangeDownload
impl PresignedRangeDownload
Sourcepub fn new(plan: PresignedRangeDownloadPlan) -> Self
pub fn new(plan: PresignedRangeDownloadPlan) -> Self
Creates a download protocol from a plan.
Sourcepub fn with_url_refresher(
self,
refresher: Arc<dyn PresignedDownloadUrlRefresher>,
) -> Self
pub fn with_url_refresher( self, refresher: Arc<dyn PresignedDownloadUrlRefresher>, ) -> Self
Adds a synchronous URL refresher used when range URL is expired or close to expiry.
Sourcepub fn plan(&self) -> Result<PresignedRangeDownloadPlan, MeowError>
pub fn plan(&self) -> Result<PresignedRangeDownloadPlan, MeowError>
Returns a snapshot of the current download plan.
Trait Implementations§
Source§impl BreakpointDownload for PresignedRangeDownload
impl BreakpointDownload for PresignedRangeDownload
Source§fn total_size_hint(&self, _task: &TransferTask) -> Option<u64>
fn total_size_hint(&self, _task: &TransferTask) -> Option<u64>
Returns known remote total size and skips the HEAD prepare request when
present. Read more
Source§fn head_url(&self, task: &TransferTask) -> String
fn head_url(&self, task: &TransferTask) -> String
Returns full URL for HEAD request. Read more
Source§fn range_url(&self, _task: &TransferTask) -> String
fn range_url(&self, _task: &TransferTask) -> String
Returns full URL for range GET requests. Read more
Source§fn merge_head_headers(&self, ctx: DownloadHeadCtx<'_>) -> Result<(), MeowError>
fn merge_head_headers(&self, ctx: DownloadHeadCtx<'_>) -> Result<(), MeowError>
Merges protocol-specific headers before sending HEAD request. Read more
Source§fn merge_range_get_headers(
&self,
ctx: DownloadRangeGetCtx<'_>,
) -> Result<(), MeowError>
fn merge_range_get_headers( &self, ctx: DownloadRangeGetCtx<'_>, ) -> Result<(), MeowError>
Merges protocol-specific headers before range GET request. Read more
Source§fn resume_identity(
&self,
_task: &TransferTask,
) -> Result<Option<Vec<u8>>, MeowError>
fn resume_identity( &self, _task: &TransferTask, ) -> Result<Option<Vec<u8>>, MeowError>
Returns stable, protocol-specific bytes that bind a persisted download
checkpoint to the effective range-request representation. Read more
Source§fn supports_parallel_parts(&self) -> bool
fn supports_parallel_parts(&self) -> bool
Whether this download protocol is safe to fetch out of order, so the
executor may run up to
max_parts_in_flight range GETs of one file
concurrently and write them at absolute offsets. Read moreSource§impl Clone for PresignedRangeDownload
impl Clone for PresignedRangeDownload
Source§fn clone(&self) -> PresignedRangeDownload
fn clone(&self) -> PresignedRangeDownload
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 PresignedRangeDownload
impl !UnwindSafe for PresignedRangeDownload
impl Freeze for PresignedRangeDownload
impl Send for PresignedRangeDownload
impl Sync for PresignedRangeDownload
impl Unpin for PresignedRangeDownload
impl UnsafeUnpin for PresignedRangeDownload
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