Struct curl::multi::EasyHandle

source ·
pub struct EasyHandle { /* private fields */ }
Expand description

Wrapper around an easy handle while it’s owned by a multi handle.

Once an easy handle has been added to a multi handle then it can no longer be used via perform. This handle is also used to remove the easy handle from the multi handle when desired.

Implementations§

source§

impl EasyHandle

source

pub fn set_token(&mut self, token: usize) -> Result<(), Error>

Sets an internal private token for this EasyHandle.

This function will set the CURLOPT_PRIVATE field on the underlying easy handle.

source

pub fn time_condition_unmet(&mut self) -> Result<bool, Error>

source

pub fn effective_url(&mut self) -> Result<Option<&str>, Error>

source

pub fn effective_url_bytes(&mut self) -> Result<Option<&[u8]>, Error>

source

pub fn response_code(&mut self) -> Result<u32, Error>

source

pub fn http_connectcode(&mut self) -> Result<u32, Error>

source

pub fn filetime(&mut self) -> Result<Option<i64>, Error>

Same as Easy2::filetime.

source

pub fn download_size(&mut self) -> Result<f64, Error>

source

pub fn content_length_download(&mut self) -> Result<f64, Error>

source

pub fn total_time(&mut self) -> Result<Duration, Error>

source

pub fn namelookup_time(&mut self) -> Result<Duration, Error>

source

pub fn connect_time(&mut self) -> Result<Duration, Error>

source

pub fn appconnect_time(&mut self) -> Result<Duration, Error>

source

pub fn pretransfer_time(&mut self) -> Result<Duration, Error>

source

pub fn starttransfer_time(&mut self) -> Result<Duration, Error>

source

pub fn redirect_time(&mut self) -> Result<Duration, Error>

source

pub fn redirect_count(&mut self) -> Result<u32, Error>

source

pub fn redirect_url(&mut self) -> Result<Option<&str>, Error>

source

pub fn redirect_url_bytes(&mut self) -> Result<Option<&[u8]>, Error>

source

pub fn header_size(&mut self) -> Result<u64, Error>

source

pub fn request_size(&mut self) -> Result<u64, Error>

source

pub fn content_type(&mut self) -> Result<Option<&str>, Error>

source

pub fn content_type_bytes(&mut self) -> Result<Option<&[u8]>, Error>

source

pub fn os_errno(&mut self) -> Result<i32, Error>

Same as Easy2::os_errno.

source

pub fn primary_ip(&mut self) -> Result<Option<&str>, Error>

source

pub fn primary_port(&mut self) -> Result<u16, Error>

source

pub fn local_ip(&mut self) -> Result<Option<&str>, Error>

Same as Easy2::local_ip.

source

pub fn local_port(&mut self) -> Result<u16, Error>

source

pub fn cookies(&mut self) -> Result<List, Error>

Same as Easy2::cookies.

source

pub fn unpause_read(&self) -> Result<(), Error>

Unpause reading on a connection.

Using this function, you can explicitly unpause a connection that was previously paused.

A connection can be paused by letting the read or the write callbacks return ReadError::Pause or WriteError::Pause.

The chance is high that you will get your write callback called before this function returns.

source

pub fn unpause_write(&self) -> Result<(), Error>

Unpause writing on a connection.

Using this function, you can explicitly unpause a connection that was previously paused.

A connection can be paused by letting the read or the write callbacks return ReadError::Pause or WriteError::Pause. A write callback that returns pause signals to the library that it couldn’t take care of any data at all, and that data will then be delivered again to the callback when the writing is later unpaused.

source

pub fn raw(&self) -> *mut CURL

Get a pointer to the raw underlying CURL handle.

Trait Implementations§

source§

impl Debug for EasyHandle

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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>,

§

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>,

§

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.