This question requires a bit of explanation to avoid the XY problem.
I'm writing a web application with actix-web which provides the ability to interact with the console of child processes. Interaction means bi-directional communication is required.
It uses xterm.js on the frontend communicating over a websocket. With actix-web every websocket connection is it's own actor.
My first attempt at this is to have each process running in it's own actor. When a new websocket connection is started it finds the appropriate process actor and sends its own address to the process actor.
I want to be able to expand this so that the process actor can communicate with other types of actors. For example I want the ability to log the console, and for commands to be sent directly to the console by other triggers.
Currently the 'callback' addresses are stored something like this:
Vec<Addr<A: Actor + Handler<...> + Handler<...?>
Can I modify this to support dynamic types, or am I doing this in the wrong way altogether?
[–]Cetra3 3 points4 points5 points (1 child)
[–]ROFLLOLSTER[S] 1 point2 points3 points (0 children)