You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make ClientBuilder directly accept boxed handler types (#3431)
Rather than having the `ClientBuilder` accept `impl Into<Arc<H>> where H:
HandlerTrait`, directly accept the corresponding `Arc<dyn HandlerTrait>`.
This allows accepting non-concrete handler types (f.e. if constructed by a
function that returns `Arc<dyn HandlerTrait>` already) and fixes type inference
failures when passing an `Arc<H>` rather than `H`.
This affects the setters for `EventHandler`, `RawEventHandler`, `Framework`,
and `VoiceGatewayManager`.
`Framework` is in a bit of a weird spot because it is only put in an `Arc`
after `Framework::init` has been called, so a `&mut` can be taken to it for
that call, so this PR has `ClientBuilder` accept `Box<dyn Framework>` for it.
Most of the commit diff is related to fixing examples.
0 commit comments