v0.1.0
parent
2e70d350ed
commit
756085ec4d
|
@ -31,5 +31,8 @@ websockets = ["tokio", "tokio-tungstenite"]
|
|||
blocking = ["reqwest/blocking"]
|
||||
debug = []
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
[profile.bench]
|
||||
debug = true
|
||||
|
|
|
@ -13,11 +13,15 @@
|
|||
* except according to those terms.
|
||||
*/
|
||||
|
||||
#[cfg(feature = "websockets")]
|
||||
use futures_util::StreamExt;
|
||||
#[cfg(feature = "websockets")]
|
||||
use jmap_client::{client::Client, client_ws::WebSocketMessage, core::set::SetObject};
|
||||
#[cfg(feature = "websockets")]
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
// Make sure the "websockets" feature is enabled!
|
||||
#[cfg(feature = "websockets")]
|
||||
async fn websocket() {
|
||||
// Connect to the JMAP server using Basic authentication
|
||||
let client = Client::new()
|
||||
|
@ -82,5 +86,6 @@ async fn websocket() {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
#[cfg(feature = "websockets")]
|
||||
let _c = websocket();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue