pub struct ResponseHandler { /* private fields */ }
Expand description

A handler of Easy2

use curl::easy::Easy2;
use async_curl::response_handler::ResponseHandler;

let easy2 = Easy2::new(ResponseHandler::new());

println!("{:?}", easy2.get_ref());

Implementations§

source§

impl ResponseHandler

source

pub fn new() -> Self

source

pub fn get_data(self) -> Vec<u8>

Trait Implementations§

source§

impl Clone for ResponseHandler

source§

fn clone(&self) -> ResponseHandler

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ResponseHandler

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ResponseHandler

source§

fn default() -> ResponseHandler

Returns the “default value” for a type. Read more
source§

impl Handler for ResponseHandler

source§

fn write(&mut self, data: &[u8]) -> Result<usize, WriteError>

Callback invoked whenever curl has downloaded data for the application. Read more
source§

fn read(&mut self, data: &mut [u8]) -> Result<usize, ReadError>

Read callback for data uploads. Read more
source§

fn seek(&mut self, whence: SeekFrom) -> SeekResult

User callback for seeking in input stream. Read more
source§

fn debug(&mut self, kind: InfoType, data: &[u8])

Specify a debug callback Read more
source§

fn header(&mut self, data: &[u8]) -> bool

Callback that receives header data Read more
source§

fn progress( &mut self, dltotal: f64, dlnow: f64, ultotal: f64, ulnow: f64 ) -> bool

Callback to progress meter function Read more
source§

fn ssl_ctx(&mut self, cx: *mut c_void) -> Result<(), Error>

Callback to SSL context Read more
source§

fn open_socket( &mut self, family: i32, socktype: i32, protocol: i32 ) -> Option<i32>

Callback to open sockets for libcurl. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.