-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
160 additions
and
2,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "jmap-client" | ||
description = "JMAP client library for Rust" | ||
version = "0.2.0" | ||
version = "0.2.1" | ||
edition = "2018" | ||
authors = [ "Stalwart Labs Ltd. <[email protected]>"] | ||
license = "Apache-2.0 OR MIT" | ||
|
@@ -12,8 +12,8 @@ categories = ["email"] | |
readme = "README.md" | ||
|
||
[dependencies] | ||
reqwest = { git = "https://github.com/stalwartlabs/reqwest.git", version = "0.11", default-features = false, features = ["rustls-tls"]} | ||
tokio-tungstenite = { version = "0.17", features = ["rustls-tls-webpki-roots"], optional = true} | ||
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls"]} | ||
tokio-tungstenite = { version = "0.18", features = ["rustls-tls-webpki-roots"], optional = true} | ||
tokio = { version = "1.16", default-features = false, features = ["io-util"], optional = true } | ||
futures-util = { version = "0.3", optional = true} | ||
async-stream = { version = "0.3", optional = true} | ||
|
@@ -23,13 +23,13 @@ chrono = { version = "0.4", features = ["serde"]} | |
ahash = {version = "0.8", features = ["serde"]} | ||
parking_lot = "0.12" | ||
base64 = "0.13" | ||
maybe-async = "0.2" | ||
|
||
[features] | ||
default = ["async"] | ||
async = ["futures-util", "async-stream", "reqwest/stream"] | ||
websockets = ["tokio", "tokio-tungstenite"] | ||
blocking = ["reqwest/blocking"] | ||
follow-trusted = [] | ||
blocking = ["reqwest/blocking", "maybe-async/is_sync"] | ||
debug = [] | ||
|
||
[lib] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,20 +13,23 @@ | |
* except according to those terms. | ||
*/ | ||
|
||
#[cfg(feature = "async")] | ||
use jmap_client::{ | ||
client::Client, | ||
core::query::Filter, | ||
email::{self, Property}, | ||
mailbox::{self, Role}, | ||
}; | ||
|
||
#[cfg(feature = "async")] | ||
const TEST_MESSAGE: &[u8; 90] = br#"From: [email protected] | ||
To: [email protected] | ||
Subject: Testing JMAP client | ||
This is a test. | ||
"#; | ||
|
||
#[cfg(feature = "async")] | ||
async fn messages() { | ||
// Connect to the JMAP server using Basic authentication | ||
let client = Client::new() | ||
|
@@ -116,5 +119,6 @@ async fn messages() { | |
} | ||
|
||
fn main() { | ||
#[cfg(feature = "async")] | ||
let _c = messages(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.