lemunozm / mailfred Goto Github PK
View Code? Open in Web Editor NEWExpose services through the email infrastructure
License: Apache License 2.0
Expose services through the email infrastructure
License: Apache License 2.0
I receive many compile errors when trying to use the library (I followed the steps in the README), below the output:
$ cargo build
Compiling mailfred v0.1.0
error[E0282]: type annotations needed
--> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mailfred-0.1.0/src/transports/imap.rs:42:87
|
42 | let client = ClientBuilder::new(&self.domain, self.port).connect(|domain, tcp| {
| ^^^
43 | tcp_stream = Some(tcp.try_clone()?);
| --- type must be known at this point
|
help: consider giving this closure parameter an explicit type
|
42 | let client = ClientBuilder::new(&self.domain, self.port).connect(|domain, tcp: /* Type */| {
| ++++++++++++
error[E0061]: this method takes 0 arguments but 1 argument was supplied
--> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mailfred-0.1.0/src/transports/imap.rs:42:70
|
42 | let client = ClientBuilder::new(&self.domain, self.port).connect(|domain, tcp| {
| ______________________________________________________________________^^^^^^^_-
43 | | tcp_stream = Some(tcp.try_clone()?);
44 | | let ssl_conn = TlsConnector::builder().build()?;
45 | | Ok(TlsConnector::connect(&ssl_conn, domain, tcp)?)
46 | | })?;
| | -
| | |
| |_____________unexpected argument
| help: remove the extra argument
|
note: method defined here
--> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/imap-3.0.0-alpha.12/src/client_builder.rs:218:12
|
218 | pub fn connect(&self) -> Result<Client<Connection>> {
| ^^^^^^^
error[E0599]: no method named `native_tls` found for struct `ClientBuilder` in the current scope
--> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mailfred-0.1.0/src/transports/imap.rs:159:72
|
159 | let client = imap::ClientBuilder::new(&self.domain, self.port).native_tls()?;
| ^^^^^^^^^^ method not found in `ClientBuilder<&String>`
error[E0308]: mismatched types
--> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mailfred-0.1.0/src/transports/smtp.rs:34:13
|
34 | client,
| ^^^^^^ expected `TlsStream<TcpStream>`, found a different `TlsStream<TcpStream>`
|
= note: `TlsStream<TcpStream>` and `TlsStream<TcpStream>` have similar names, but are actually distinct types
note: `TlsStream<TcpStream>` is defined in crate `tokio_rustls`
--> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rustls-0.25.0/src/client.rs:17:1
|
17 | pub struct TlsStream<IO> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: `TlsStream<TcpStream>` is defined in crate `tokio_rustls`
--> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rustls-0.24.1/src/client.rs:11:1
|
11 | pub struct TlsStream<IO> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `tokio_rustls` are being used?
Some errors have detailed explanations: E0061, E0282, E0308, E0599.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `mailfred` (lib) due to 4 previous errors
Rust version:
$ rustc --version
rustc 1.75.0 (82e1608df 2023-12-21)
Any help would be appreciated
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.