Skip to main content

hyperstack_sdk/
lib.rs

1//! Rust client SDK for connecting to HyperStack streaming servers.
2//!
3//! ```rust,ignore
4//! use hyperstack_sdk::prelude::*;
5//! use hyperstack_stacks::ore::OreStack;
6//!
7//! #[tokio::main]
8//! async fn main() -> anyhow::Result<()> {
9//!     let hs = HyperStack::<OreStack>::connect().await?;
10//!     
11//!     for round in hs.views.latest().listen() {
12//!         println!("Round: {:?}", round);
13//!     }
14//!     
15//!     Ok(())
16//! }
17//! ```
18
19mod client;
20mod config;
21mod connection;
22mod entity;
23mod error;
24mod frame;
25pub mod prelude;
26pub mod serde_utils;
27mod store;
28mod stream;
29mod subscription;
30pub mod view;
31
32pub use client::{HyperStack, HyperStackBuilder};
33pub use connection::ConnectionState;
34pub use entity::Stack;
35pub use error::HyperStackError;
36pub use frame::{Frame, Mode, Operation};
37pub use store::{SharedStore, StoreUpdate};
38pub use stream::{
39    EntityStream, FilterMapStream, FilteredStream, KeyFilter, MapStream, RichEntityStream,
40    RichUpdate, Update, UseStream,
41};
42pub use subscription::Subscription;
43pub use view::{RichWatchBuilder, StateView, UseBuilder, ViewBuilder, ViewHandle, Views, WatchBuilder};