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
Currently Client is parametrized over the Read + Write + fmt::Debug types. Unfortunately, because this is a requirement of three non-marker traits, it does not seem possible to write code which is agnostic to the specific kind of the underlying stream by using a trait object like Box<dyn Read + Write + fmt::Debug>.
My use case is that I need to write some code which works with IMAP servers, but depending on configuration those servers can be TLS or non-TLS. As of now, it does not seem possible to handle such servers in a uniform way.
I'm frankly not sure how, but it would be great if the library supported some kind of a way to write code which does not depend on the connection details of a particular client and would allow working with any of them. I guess the most straightforward way to do it would be to extract the public interface of the Client and Session structs to traits, but given that traits can't have async method now, it might be hard to do...
The text was updated successfully, but these errors were encountered:
Currently
Client
is parametrized over theRead + Write + fmt::Debug
types. Unfortunately, because this is a requirement of three non-marker traits, it does not seem possible to write code which is agnostic to the specific kind of the underlying stream by using a trait object likeBox<dyn Read + Write + fmt::Debug>
.My use case is that I need to write some code which works with IMAP servers, but depending on configuration those servers can be TLS or non-TLS. As of now, it does not seem possible to handle such servers in a uniform way.
I'm frankly not sure how, but it would be great if the library supported some kind of a way to write code which does not depend on the connection details of a particular client and would allow working with any of them. I guess the most straightforward way to do it would be to extract the public interface of the
Client
andSession
structs to traits, but given that traits can't have async method now, it might be hard to do...The text was updated successfully, but these errors were encountered: