pub trait Stack:
Sized
+ Send
+ Sync
+ 'static {
type Views: Views;
// Required methods
fn name() -> &'static str;
fn url() -> &'static str;
}Expand description
Stack definition trait - defines the shape of a HyperStack deployment.
ⓘ
use hyperstack_sdk::{Stack, Views};
pub struct OreStack;
impl Stack for OreStack {
type Views = OreRoundViews;
fn name() -> &'static str { "ore-round" }
fn url() -> &'static str { "wss://ore.stack.usehyperstack.com" }
}
// Usage
let hs = HyperStack::<OreStack>::connect().await?;
let rounds = hs.views.latest().get().await;Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".