pub struct Transfer<'easy, 'data> { /* private fields */ }
Expand description

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.

Implementations

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::perform.

Same as Easy::unpause_read.

Same as Easy::unpause_write

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.