docs.rs failed to build deboa-extras-0.0.9-beta.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
deboa-extras-0.0.8
Deboa Extras
This crate provides additional features for Deboa like compression and serialization.
Install
Either run from command line:
cargo add deboa-extras
Or add to your Cargo.toml:
= "0.0.1"
Features
jsonserializationmsgpackserializationxmlserializationgzipcompressionbrotlicompressiondeflatecompressionwebsocketsupportssesupport
Usage
Decompression
use ;
use ;
let encoding_catcher = register_decoders;
let client = builder
.catch
.build?
let posts = get?
.send_with
.await?
.body_as?;
println!;
Serialization
use ;
use JsonBody;
let client = default;
let data = Post ;
let response = post?
.body_as?
.send_with
.await?;
println!;
SSE
use ;
use ;
let client = default;
let response = client.execute.await?.into_event_stream;
// Poll events, until the connection is closed
// please note that this is a blocking call
while let Some = response.next.await
println!;
Websockets
use ;
use ;
let client = default;
let websocket = websocket?
.send_with
.await?
.into_websocket
.await;
while let Ok = websocket.read_message.await
License
MIT
Author
Rogerio Pereira Araujo rogerio.araujo@gmail.com