If actions can do all their work through the Editor trait, then it is possible to control actions externally without adding dependencies to the editor controller. The only thing shared between the editor and actions could be the type of the data that gets edited.
For example, one could write a tool controller that had button settings and linked up actions through fn (&mut Editor) -> Result<(), ()>. The editor or tool controller do not need to depend on the actions, so it could be used as a library and extended with new features.
Tool controllers could be part of the library that shares the tool state between editor and actions. There could be a default alternative for tool controller. However, it will be possible to switch it out for another.
If actions can do all their work through the
Editor
trait, then it is possible to control actions externally without adding dependencies to the editor controller. The only thing shared between the editor and actions could be the type of the data that gets edited.For example, one could write a tool controller that had button settings and linked up actions through
fn (&mut Editor) -> Result<(), ()>
. The editor or tool controller do not need to depend on the actions, so it could be used as a library and extended with new features.Tool controllers could be part of the library that shares the tool state between editor and actions. There could be a default alternative for tool controller. However, it will be possible to switch it out for another.