pub struct HyperStack<S>where
S: Stack,{
pub views: <S as Stack>::Views,
/* private fields */
}Expand description
HyperStack client with typed views access.
ⓘ
use hyperstack_sdk::prelude::*;
use hyperstack_stacks::ore::OreStack;
let hs = HyperStack::<OreStack>::connect().await?;
let rounds = hs.views.latest().get().await;Fields§
§views: <S as Stack>::ViewsImplementations§
Source§impl<S> HyperStack<S>where
S: Stack,
impl<S> HyperStack<S>where
S: Stack,
Sourcepub async fn connect() -> Result<HyperStack<S>, HyperStackError>
pub async fn connect() -> Result<HyperStack<S>, HyperStackError>
Connect to the stack’s default URL.
Sourcepub async fn connect_url(url: &str) -> Result<HyperStack<S>, HyperStackError>
pub async fn connect_url(url: &str) -> Result<HyperStack<S>, HyperStackError>
Connect with custom URL.
Sourcepub fn builder() -> HyperStackBuilder<S>
pub fn builder() -> HyperStackBuilder<S>
Create a builder for custom configuration.
pub async fn connection_state(&self) -> ConnectionState
pub async fn disconnect(&self)
pub fn store(&self) -> &SharedStore
Auto Trait Implementations§
impl<S> Freeze for HyperStack<S>
impl<S> !RefUnwindSafe for HyperStack<S>
impl<S> Send for HyperStack<S>
impl<S> Sync for HyperStack<S>
impl<S> Unpin for HyperStack<S>
impl<S> !UnwindSafe for HyperStack<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more