1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Client framework for the Bloop wire protocol.
//!
//! [`BloopClient`] owns the whole connection lifecycle a Bloop client needs:
//! DNS lookup, TLS, protocol handshake, authentication, keep-alive pings,
//! and reconnecting after failures. Applications observe the connection
//! through a status watch and perform strictly serialized request-response
//! exchanges, either through the typed standard operations or through
//! [`Request`]-implementing extension messages defined with the
//! [`bloop_protocol`] derives.
//!
//! # Examples
//!
//! ```no_run
//! use bloop_client_framework::{BloopClient, ConnectionConfig};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let client = BloopClient::builder()
//! .config(ConnectionConfig {
//! host: "bloop.example.com".to_string(),
//! port: 12345,
//! client_id: "client".to_string(),
//! client_secret: "secret".to_string(),
//! })
//! .build()?;
//!
//! let mut status = client.status();
//! status.wait_for(|status| matches!(status, bloop_client_framework::ConnectionStatus::Connected { .. })).await?;
//!
//! let uid = bloop_protocol::NfcUid::try_from(&[1u8, 2, 3, 4][..])?;
//! let achievements = client.bloop(uid).await?;
//! # Ok(())
//! # }
//! ```
pub use bloop_protocol;
pub use ;
pub use ;
pub use Session;
pub use ;
pub use ;