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
Use the downcast-rs crate - This will allow us to remove the AsAny and AsAnyMut code we currently have. It also provides a way for going from boxed trait objects to boxed concrete types without cloning, something that isn't possible with the current API. eg. Box<dyn ClientState> -> Box<TmClientState>.
Use macros for ErasedPartialEq defs and impls. Ideally all erased traits and their blanket impls must follow the convention that most well-known dyn-* rust crates use, for e.g. dyn-clone ->
/// Define trait with supertraittraitMyTrait:DynClone{/* ... */}/// Use proc-macro to provide default impl
dyn_clone::clone_trait_object!(MyTrait);
Separate trait for into_box(). (downcast-rs might already have a solution for this)
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate milestone (priority) applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
Summary
This is the follow-up issue for PR informalsystems/hermes#2483.
AsAny
andAsAnyMut
code we currently have. It also provides a way for going from boxed trait objects to boxed concrete types without cloning, something that isn't possible with the current API. eg.Box<dyn ClientState>
->Box<TmClientState>
.ErasedPartialEq
defs and impls. Ideally all erased traits and their blanket impls must follow the convention that most well-known dyn-* rust crates use, for e.g.dyn-clone
->into_box()
. (downcast-rs might already have a solution for this)For Admin Use
The text was updated successfully, but these errors were encountered: