Skip to content

【actix-web-actors】impl Handler method how to obtain async environment #2828

Description

@adminSxs

example:

struct ws;

impl StreamHandler<Result<Message, ProtocolError>> for Ws {
    fn handle(&mut self, msg: Result<Message, ProtocolError>, ctx: &mut Self::Context) {
    
        }
 }

async fn handler1(){

}

I want to call handler1().await in handle method

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions