Struct rustdb::webtrans::WebTransaction[][src]

pub struct WebTransaction {
    pub method: Rc<String>,
    pub path: Rc<String>,
    pub query: Map,
    pub form: Map,
    pub cookies: Map,
    pub parts: Vec<Part>,
    pub err: String,
    pub output: Vec<u8>,
    pub status_code: String,
    pub headers: String,
    pub now: i64,
    pub ext: Box<dyn Any + Send + Sync>,
}
Expand description

Response content is accumulated in output.

Fields

method: Rc<String>path: Rc<String>query: Mapform: Mapcookies: Mapparts: Vec<Part>err: Stringoutput: Vec<u8>status_code: Stringheaders: Stringnow: i64ext: Box<dyn Any + Send + Sync>

Implementations

Reads the http request from the TCP stream into a new WebTransaction.

Writes the http response to the TCP stream.

Trait Implementations

ARG builtin function. Get path, query parameter, form value or cookie.

GLOBAL builtin function. Used to get request time.

Append SELECT values to response body.

Set the error string.

Get the error string.

STATUSCODE builtin function. sets the response status code.

HEADER builtin function, adds header to response.

Get file attribute ( One of name, content_type, file_name )

Get file content.

Set the extension.

Get the extension. Note: this takes ownership, so extension needs to be set afterwards.

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

Performs the conversion.

Performs the conversion.

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.