Struct phd::request::Request

source ·
pub struct Request {
    pub selector: String,
    pub query: String,
    pub root: String,
    pub host: String,
    pub port: u16,
}
Expand description

This struct represents a single gopher request.

Fields§

§selector: String

Gopher selector requested

§query: String

Search query string, if any.

§root: String

Root directory of the server. Can’t serve outside of this.

§host: String

Host of the currently running server.

§port: u16

Port of the currently running server.

Implementations§

Try to create a new request state object.

Path to the target file on disk requested by this request.

Path to the target file relative to the server root.

Set selector + query based on what the client sent.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.