pub struct StateGraphManager<T: KeyValueStore + 'static> { /* private fields */ }
Expand description
State graph manager with KeyValueStore backend
Implementations§
Source§impl<T: KeyValueStore + 'static> StateGraphManager<T>
impl<T: KeyValueStore + 'static> StateGraphManager<T>
Sourcepub async fn create_component(
&self,
component_id: &str,
component_type: &str,
props: Value,
) -> Result<()>
pub async fn create_component( &self, component_id: &str, component_type: &str, props: Value, ) -> Result<()>
Create or update a UI component
Sourcepub async fn get_component(&self, component_id: &str) -> Result<Option<Value>>
pub async fn get_component(&self, component_id: &str) -> Result<Option<Value>>
Get a UI component
Sourcepub async fn update_component_props(
&self,
component_id: &str,
props: Value,
) -> Result<()>
pub async fn update_component_props( &self, component_id: &str, props: Value, ) -> Result<()>
Update component properties
Sourcepub async fn set_component_state(
&self,
component_id: &str,
state_key: &str,
state_value: Value,
) -> Result<()>
pub async fn set_component_state( &self, component_id: &str, state_key: &str, state_value: Value, ) -> Result<()>
Set component state
Auto Trait Implementations§
impl<T> Freeze for StateGraphManager<T>
impl<T> RefUnwindSafe for StateGraphManager<T>where
T: RefUnwindSafe,
impl<T> Send for StateGraphManager<T>
impl<T> Sync for StateGraphManager<T>
impl<T> Unpin for StateGraphManager<T>
impl<T> UnwindSafe for StateGraphManager<T>where
T: RefUnwindSafe,
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