Open
Description
What problem does this solve or what need does it fill?
Currently to drill an allocated object into plugins you either need to use a resource or Arc<Mutex<>>
. It would nice for the default, most common case to allow consuming plugin content on build..
What solution would you like?
The Plugin
trait should only have one method: build(self, &mut App)
. The existing Plugin
trait should be renamed to FullPlugin
, and its methods should be &mut
not &
.
What alternative(s) have you considered?
Continue using resources/Arc<Mutex<>>
.
Additional context
IIRC the current &self
restriction is from the old plugin design. Don't see any reason or docs saying the plugin methods can't be mutable.