Struct curl::easy::Transfer [] [src]

pub struct Transfer<'easy, 'data> { /* fields omitted */ }

A scoped transfer of information which borrows an Easy and allows referencing stack-local data of the lifetime 'data.

Usage of Easy requires the 'static and Send bounds on all callbacks registered, but that's not often wanted if all you need is to collect a bunch of data in memory to a vector, for example. The Transfer structure, created by the Easy::transfer method, is used for this sort of request.

The callbacks attached to a Transfer are only active for that one transfer object, and they allow to elide both the Send and 'static bounds to close over stack-local information.

Methods

impl<'easy, 'data> Transfer<'easy, 'data>
[src]

Same as Easy::write_function, just takes a non 'static lifetime corresponding to the lifetime of this transfer.

Same as Easy::read_function, just takes a non 'static lifetime corresponding to the lifetime of this transfer.

Same as Easy::seek_function, just takes a non 'static lifetime corresponding to the lifetime of this transfer.

Same as Easy::progress_function, just takes a non 'static lifetime corresponding to the lifetime of this transfer.

Same as Easy::ssl_ctx_function, just takes a non 'static lifetime corresponding to the lifetime of this transfer.

Same as Easy::debug_function, just takes a non 'static lifetime corresponding to the lifetime of this transfer.

Same as Easy::header_function, just takes a non 'static lifetime corresponding to the lifetime of this transfer.

Same as Easy::transfer.

Same as Easy::unpause_read.

Same as Easy::unpause_write