def read_processor(self, value: Optional[ProxyProcessorType]) -> None: if value is None: self.__processors["read"] = self._blank_processor return self.__processors["read"] = aiomisc.awaitable(value)
def write_processor(self, value: t.Optional[ProxyProcessorType]) -> None: if value is None: self.__processors["write"] = self._blank_processor return self.__processors["write"] = aiomisc.awaitable(value)
def payload(func, *args, **kwargs): nonlocal entities func = partial(awaitable(func), *args, **kwargs) entities.append(func)