rust-imap | IMAP client library for Rust | Email library
kandi X-RAY | rust-imap Summary
kandi X-RAY | rust-imap Summary
IMAP client library for Rust
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rust-imap
rust-imap Key Features
rust-imap Examples and Code Snippets
Community Discussions
Trending Discussions on rust-imap
QUESTION
I want to return a different IMAP connection depending on the secure
variable, but imap::client::Client
returns a different type if we use SSL or not. All of the functions in Client
are implemented by impl Client
.
Is there a better and way more efficient solution possible?
...ANSWER
Answered 2017-Aug-28 at 13:18Your approach does not seem bad. My suggest is to use composition: encapsulate your enum
in a struct
and do the thing you want in each method with a match
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rust-imap
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page