pub struct DownloadInstance { /* private fields */ }Implementations§
source§impl DownloadInstance
impl DownloadInstance
sourcepub fn write_callback(&self, data: &[u8]) -> u64
pub fn write_callback(&self, data: &[u8]) -> u64
Use inside CustomDownloadInstance::perform_custom_request to pass data back to the caller.
sourcepub fn read_callback(&self, data: &mut [u8]) -> i64
pub fn read_callback(&self, data: &mut [u8]) -> i64
Use inside CustomDownloadInstance::perform_custom_request to read data from the caller.
sourcepub fn progress_callback(&self, progress: u64, total: u64) -> bool
pub fn progress_callback(&self, progress: u64, total: u64) -> bool
Use inside CustomDownloadInstance::perform_custom_request to inform the caller of the request progress.
pub fn get<I>( &mut self, url: &str, headers: I, ) -> Result<OwnedDownloadResponse, String>
pub fn post<I>( &mut self, url: &str, headers: I, body: Vec<u8>, ) -> Result<OwnedDownloadResponse, String>
pub fn post_json<I, T>( &mut self, url: &str, headers: I, body: &T, ) -> Result<OwnedDownloadResponse, String>
pub fn perform_request( &mut self, url: &str, callbacks: &DownloadInstanceOutputCallbacks, ) -> Result<(), String>
pub fn perform_custom_request<I>( &mut self, method: &str, url: &str, headers: I, callbacks: &DownloadInstanceInputOutputCallbacks, ) -> Result<DownloadResponse, String>
Trait Implementations§
source§impl ToOwned for DownloadInstance
impl ToOwned for DownloadInstance
source§type Owned = Ref<DownloadInstance>
type Owned = Ref<DownloadInstance>
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl Send for DownloadInstance
impl Sync for DownloadInstance
Auto Trait Implementations§
impl Freeze for DownloadInstance
impl RefUnwindSafe for DownloadInstance
impl Unpin for DownloadInstance
impl UnwindSafe for DownloadInstance
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