Collector

Struct Collector 

Source
pub struct Collector<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Collector<'a>

Source

pub fn new( config: &'a Config, data: &'a mut Vec<u8>, headers: &'a mut Vec<u8>, ) -> Self

Trait Implementations§

Source§

impl<'a> Handler for Collector<'a>

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, into: &mut [u8]) -> Result<usize, ReadError>

Read callback for data uploads. Read more
Source§

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

Callback that receives header data 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 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§

§

impl<'a> Freeze for Collector<'a>

§

impl<'a> RefUnwindSafe for Collector<'a>

§

impl<'a> Send for Collector<'a>

§

impl<'a> Sync for Collector<'a>

§

impl<'a> Unpin for Collector<'a>

§

impl<'a> !UnwindSafe for Collector<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.