Struct r2d2::Extensions[][src]

pub struct Extensions(_);
Expand description

A “type map” used to associate data with pooled connections.

Extensions is a data structure mapping types to a value of that type. This can be used to, for example, cache prepared statements along side their connection.

Implementations

Returns a new, empty Extensions.

Inserts a new value into the map.

Returns the previously stored value of that type, if present.

Returns a shared reference to the stored value of the specified type.

Returns a mutable reference to the stored value of the specified type.

Removes the value of the specified type from the map, returning it.

Removes all values from the map.

Trait Implementations

Returns the “default value” for a type. 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

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.