pyrlang.gen.decorators¶
Decorator funcitons for building Gen based classes.
the functions call, cast, info are function decorators.
If you need to overrdide for extra functionality you probably want to use the classes CallDecorator, CastDecorator, InfoDecorator instead
- pyrlang.gen.decorators.async_wrapper_factory(fun)¶
A coroutine function that calls the plain function
fun.
- class pyrlang.gen.decorators.HandleDecorator(order, pattern=None)¶
Bases:
objectBase class for handler Decorators, don’t use directly
- class pyrlang.gen.decorators.CallDecorator(order, pattern=None)¶
Bases:
HandleDecoratorhandle_call decorator, decorate functions that should be part of the handle_call matching
- pyrlang.gen.decorators.call(*args, **kwargs)¶
wrapper function around the CallDecorator class
- class pyrlang.gen.decorators.CastDecorator(order, pattern=None)¶
Bases:
HandleDecoratorhandle_cast decorator, decorate functions that should be part of the handle_cast matching
- pyrlang.gen.decorators.cast(*args, **kwargs)¶
wrapper function around the CastDecorator class
- class pyrlang.gen.decorators.InfoDecorator(order, pattern=None)¶
Bases:
HandleDecoratorhandle_info decorator, decorate functions that should be part of the handle_info matching
- pyrlang.gen.decorators.info(*args, **kwargs)¶
wrapper function around the InfoDecorator class