set_message_context
faststream.broker.utils.set_message_context #
set_message_context(func: Callable[[StreamMessage[MsgType]], Awaitable[WrappedReturn[T_HandlerReturn]]]) -> Callable[[StreamMessage[MsgType]], Awaitable[WrappedReturn[T_HandlerReturn]]]
Sets the message context for a function.
PARAMETER | DESCRIPTION |
---|---|
func | The function to set the message context for. TYPE: |
RETURNS | DESCRIPTION |
---|---|
Callable[[StreamMessage[MsgType]], Awaitable[WrappedReturn[T_HandlerReturn]]] | The function with the message context set. |