logo
pub struct Request(_);
Expand description

Request object.

Can be constructed from a HREQUEST handle only:

fn on_data_load(pnm: &mut SCN_LOAD_DATA) -> Option<LOAD_RESULT> {
  let mut rq = Request::from(pnm.request_id);
  // ...
}

Implementations

Mark the request as complete with status and optional data.

Mark the request as complete with failure.

Append a data chunk to the received data.

Get received (so far) data.

Get the URL of the request.

Get a real URL of the content (e.g., after possible redirection).

Get the data type of the request.

Get the resource data type of the request.

Get the MIME type of the received data.

Set the MIME type of the received data.

Set the data encoding for the received data.

Get the parameters of the request.

Get the headers of the request.

Set request header (a single item).

Get the headers of the response.

Set respone header (a single item).

Get proxy host and port (if any).

Get the current completion status of the request.

Returns current state and HTTP response code.

Get the execution duratiom of the request.

Get the execution started and ended time of the request, in milliseconds.

Trait Implementations

Copies the object.

All allocated objects are reference counted so copying is just a matter of increasing reference counts.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Destroy the object.

Executes the destructor for this type. Read more

Construct a Request object from HREQUEST handle.

Performs the conversion.

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 resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

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.