to_async
faststream.utils.functions.to_async #
to_async(
func: Union[
Callable[F_Spec, F_Return],
Callable[F_Spec, Awaitable[F_Return]],
]
) -> Callable[F_Spec, Awaitable[F_Return]]
Converts a synchronous function to an asynchronous function.
PARAMETER | DESCRIPTION |
---|---|
func | The synchronous function to be converted. TYPE: |
RETURNS | DESCRIPTION |
---|---|
Callable[F_Spec, Awaitable[F_Return]] | The asynchronous version of the input function. |