Enum curl_http_client::collector::Collector
source · pub enum Collector {
File(FileInfo),
Ram(Vec<u8>),
}
Expand description
The Collector will handle two types in order to store data, via File or via RAM.
Collector::File(FileInfo) is useful to be able to download and upload files.
Collector::Ram(Vec<u8>
) is used to store response body into Memory.
Variants§
File(FileInfo)
Collector::File(FileInfo) is useful to be able to download and upload files.
Ram(Vec<u8>)
Collector::Ram(Vec<u8>
) is used to store response body into Memory.
Trait Implementations§
source§impl ExtendedHandler for Collector
impl ExtendedHandler for Collector
source§impl Handler for Collector
impl Handler for Collector
source§fn write(&mut self, data: &[u8]) -> Result<usize, WriteError>
fn write(&mut self, data: &[u8]) -> Result<usize, WriteError>
This will store the response from the server to the data vector or into a file depends on the Collector being used.
source§fn read(&mut self, data: &mut [u8]) -> Result<usize, ReadError>
fn read(&mut self, data: &mut [u8]) -> Result<usize, ReadError>
This will read the chunks of data from a file that will be uploaded to the server. This will be use if the Collector is Collector::File(FileInfo).
source§fn seek(&mut self, whence: SeekFrom) -> SeekResult
fn seek(&mut self, whence: SeekFrom) -> SeekResult
User callback for seeking in input stream. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Collector
impl Send for Collector
impl Sync for Collector
impl Unpin for Collector
impl !UnwindSafe for Collector
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