Struct trillium::Info[][src]

pub struct Info { /* fields omitted */ }
Expand description

This struct represents information about the currently connected server.

It is passed to Handler::init and the Init handler.

Implementations

Returns a user-displayable description of the server. This might be a string like “trillium x.y.z (trillium-tokio x.y.z)” or “my special application”.

Returns a user-displayable string description of the location or port the listener is bound to, potentially as a url. Do not rely on the format of this string, as it will vary between server implementations and is intended for user display. Instead, use Info::tcp_socket_addr for any processing.

Returns the local_addr of a bound tcp listener, if such a thing exists for this server

obtain a mutable borrow of the server description, suitable for appending information or replacing it

obtain a mutable borrow of the listener description, suitable for appending information or replacing it

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

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

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)

recently added

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

Converts the given value to a String. 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.