pub struct EnhancedFetchBackend { /* private fields */ }Expand description
Enhanced fetch backend with retry logic and statistics
Implementations§
Source§impl EnhancedFetchBackend
impl EnhancedFetchBackend
Sourcepub async fn new(url: String) -> WasmResult<Self>
pub async fn new(url: String) -> WasmResult<Self>
Creates a new enhanced fetch backend
Sourcepub async fn with_config(
url: String,
retry_config: RetryConfig,
timeout_ms: u64,
) -> WasmResult<Self>
pub async fn with_config( url: String, retry_config: RetryConfig, timeout_ms: u64, ) -> WasmResult<Self>
Creates a new enhanced fetch backend with configuration
Sourcepub async fn fetch_range_with_retry(
&mut self,
range: ByteRange,
) -> WasmResult<Vec<u8>>
pub async fn fetch_range_with_retry( &mut self, range: ByteRange, ) -> WasmResult<Vec<u8>>
Fetches a range with retry logic
Sourcepub async fn fetch_ranges_parallel(
&mut self,
ranges: &[ByteRange],
max_parallel: usize,
) -> WasmResult<Vec<Vec<u8>>>
pub async fn fetch_ranges_parallel( &mut self, ranges: &[ByteRange], max_parallel: usize, ) -> WasmResult<Vec<Vec<u8>>>
Fetches multiple ranges in parallel
Sourcepub const fn stats(&self) -> &FetchStats
pub const fn stats(&self) -> &FetchStats
Returns fetch statistics
Sourcepub const fn supports_range(&self) -> bool
pub const fn supports_range(&self) -> bool
Returns whether range requests are supported
Auto Trait Implementations§
impl Freeze for EnhancedFetchBackend
impl RefUnwindSafe for EnhancedFetchBackend
impl Send for EnhancedFetchBackend
impl Sync for EnhancedFetchBackend
impl Unpin for EnhancedFetchBackend
impl UnsafeUnpin for EnhancedFetchBackend
impl UnwindSafe for EnhancedFetchBackend
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