Coder Social home page Coder Social logo

atarashii_imap's Issues

Strongly typed IMAP responses

Right now the responses are a Vec of Strings. It'd be nice if each response was it's own type/enum variant, i.e. ListResponse for the LIST command.

Consider using AsRef for public APIs

When accepting references to stringy types, it can be useful to accept a generic S: AsRef<T> where T is the target stringy type (e.g., str). For example:

fn my_fn<S: AsRef<str>>(my_name: S) {
    let my_name: &str = my_name.as_ref();
    println!("{}", my_name);
}

Can be called with owned Strings, &strs, or any other custom string-like type that implements AsRef<str>.

Current master (c18674aafa7af437fa66ffdb634b9b2c2b08862a) fails to build

error[E0433]: failed to resolve. Use of undeclared type or module `ssl`
  --> atarashii_imap/src/lib.rs:68:12
   |
68 |   StartTls(ssl::SslStream<TcpStream>),
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `ssl`

error[E0433]: failed to resolve. Use of undeclared type or module `ssl`
  --> atarashii_imap/src/lib.rs:69:10
   |
69 |   SslTls(ssl::SslStream<TcpStream>)
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `ssl`

error[E0433]: failed to resolve. Use of undeclared type or module `TslConnectorBuilder`
   --> atarashii_imap/src/lib.rs:234:25
    |
234 |         let connector = TslConnectorBuilder::new(SslMethod::tls()).unwrap().build();
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `TslConnectorBuilder`

error[E0433]: failed to resolve. Use of undeclared type or module `SslMethod`
   --> atarashii_imap/src/lib.rs:234:50
    |
234 |         let connector = TslConnectorBuilder::new(SslMethod::tls()).unwrap().build();
    |                                                  ^^^^^^^^^^^^^^ Use of undeclared type or module `SslMethod`

error[E0433]: failed to resolve. Use of undeclared type or module `ssl`
   --> atarashii_imap/src/lib.rs:248:38
    |
248 |   fn verify_greeting(stcp_conn: &mut ssl::SslStream<TcpStream>) -> () {
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module `ssl`

error: aborting due to previous error(s)

error: Could not compile `atarashii_imap`.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.