-
Notifications
You must be signed in to change notification settings - Fork 88
Implemented new enumerated Capabilities from imap-proto crate. #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
self.0.contains(s) | ||
} | ||
|
||
/// Check if the server has the given capability via str. | ||
pub fn has_str(&self, s: &str) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer for this to be generic over the type of string the same way the old one was.
Thank you! It's a little unfortunate that this is a breaking change as mentioned in the comments, but apart from that it looks pretty good! |
|
A gentle ping on this @lberezy. |
@jonhoo i'll have look at this tomorrow :) |
@jonhoo There are three solutions I can see going forward. As the upstream Capability type cuts off the
All three are not desirable, that I understand. You've put good effort in making this crate with zero copy guarantees. I would make a wager you've already identified this dilemma, and would prefer upstream to change 😛 I'm happy to implement whichever case it be, but what in your eyes is the lesser evil? |
It might be painful, but I think I agree that picking number 3 might be the best option. |
Hmm, yeah, good points. Okay, I guess it's time to do a breaking change. It's probably good to have this coincide with #130, which is not quite a breaking change, but not far from it. |
I think the only thing missing here then is the one outstanding comment about making |
Replaced by #133. |
This PR exposes the new capability of the underlying imap-proto crate (djc/tokio-imap#47) to parse Capabilities into an enumerated type.
Note that this is not yet ready for merge as it depends on the master of imap-proto, not a currently released version.