pub struct Info { /* private fields */ }
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

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

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

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.