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
I'm trying to get Iron ported over to Hyper's master branch, which is based on tokio (PR iron/iron#523). My current attempt requires that the Iron::Response type is Send. However, because Response contains a TypeMap, the compiler won't typecheck. I tried changing it to a SendMap, which then failed as Response implements Extensible from this crate which only supports TypeMap.
I tried generalizing Extensible (and thus the methods of Pluggable) over the trait passed to TypeMap, however the compiler was then unhappy as I couldn't convince it that Plugin::Value implemented typemap::internals::Implements as I can't directly specify that restriction due to typemap::internals being private. I tried making a shadow of typemap::internals::Implements, but it seems the compiler isn't smart enough to realize my shadow meant Implements had to be implemented.
I'm not sure how to proceed at this point. Do you have any suggestions? Would exposing Implements from typemap be ok?
The text was updated successfully, but these errors were encountered:
I don't think there is any strong reason not to export Implements from typemap as it is already an unsafe trait but that code is complex and I have not worked on it for a long time, so I am hesitating.
I suggest proceeding with a local fork of typemap which has Implements exported and seeing if that would actually solve the problem. If it does and I can't come up with any reason it's not safe to export in the interim we can export it officially.
Hi all,
I'm trying to get Iron ported over to Hyper's master branch, which is based on tokio (PR iron/iron#523). My current attempt requires that the Iron::Response type is Send. However, because Response contains a TypeMap, the compiler won't typecheck. I tried changing it to a SendMap, which then failed as Response implements Extensible from this crate which only supports TypeMap.
I tried generalizing Extensible (and thus the methods of Pluggable) over the trait passed to TypeMap, however the compiler was then unhappy as I couldn't convince it that Plugin::Value implemented typemap::internals::Implements as I can't directly specify that restriction due to typemap::internals being private. I tried making a shadow of typemap::internals::Implements, but it seems the compiler isn't smart enough to realize my shadow meant Implements had to be implemented.
I'm not sure how to proceed at this point. Do you have any suggestions? Would exposing Implements from typemap be ok?
The text was updated successfully, but these errors were encountered: