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;
26mod store;
27mod stream;
28mod subscription;
29pub mod view;
30
31pub use client::{HyperStack, HyperStackBuilder};
32pub use connection::ConnectionState;
33pub use entity::Stack;
34pub use error::HyperStackError;
35pub use frame::{Frame, Mode, Operation};
36pub use store::{SharedStore, StoreUpdate};
37pub use stream::{
38    EntityStream, FilterMapStream, FilteredStream, KeyFilter, MapStream, RichEntityStream,
39    RichUpdate, Update, UseStream,
40};
41pub use subscription::Subscription;
42pub use view::{RichWatchBuilder, StateView, UseBuilder, ViewBuilder, ViewHandle, Views, WatchBuilder};