Struct shio::util::typemap::TypeMap [] [src]

pub struct TypeMap<A: ?Sized = UnsafeAny> where
    A: UnsafeAnyExt
{ /* fields omitted */ }

Methods

impl TypeMap
[src]

[src]

Create a new, empty TypeMap.

impl<A: UnsafeAnyExt + ?Sized> TypeMap<A>
[src]

[src]

Create a new, empty TypeMap.

Can be used with any A parameter; new is specialized to get around the required type annotations when using this function.

[src]

Insert a value into the map with a specified key type.

[src]

Gets a value from the type map.

Panics

If there is no value in the request state of the given type.

[src]

Attempt to get a value from the type map.

[src]

Check if a key has an associated value stored in the map.

Trait Implementations

impl<A: Default + ?Sized> Default for TypeMap<A> where
    A: UnsafeAnyExt
[src]

[src]

Returns the "default value" for a type. Read more

impl<A: Debug + ?Sized> Debug for TypeMap<A> where
    A: UnsafeAnyExt
[src]

[src]

Formats the value using the given formatter.