Struct handler_map::HandlerMap[][src]

pub struct HandlerMap(_);

Struct that maps types with functions or closures that can receive them.

See the module-level documentation for more information.


impl HandlerMap

Creates a new map with no handlers.

Registers a new handler into the map.

Un-registers the handler for the given type from this map.

Returns true if the given message type has a handler registered in the map.

Returns true if the given message has a handler registered in this map.

This is the same operation as is_registered, but allows you to call it with a value rather than having to supply the type.

Calls the handler with the given message, returning whether the handler was registered.

Trait Implementations

impl Default for HandlerMap

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

Auto Trait Implementations

impl Send for HandlerMap

impl Sync for HandlerMap