pub struct ChainStore { /* private fields */ }
Expand description
Chain store for managing multiple chain definitions
Implementations§
Source§impl ChainStore
impl ChainStore
Sourcepub fn new(config: ChainConfig) -> Self
pub fn new(config: ChainConfig) -> Self
Create a new chain store
Sourcepub async fn register_chain(&self, chain: ChainDefinition) -> Result<()>
pub async fn register_chain(&self, chain: ChainDefinition) -> Result<()>
Register a chain definition
Sourcepub async fn get_chain(&self, id: &str) -> Option<ChainDefinition>
pub async fn get_chain(&self, id: &str) -> Option<ChainDefinition>
Get a chain definition by ID
Sourcepub async fn list_chains(&self) -> Vec<String>
pub async fn list_chains(&self) -> Vec<String>
List all registered chains
Sourcepub async fn remove_chain(&self, id: &str) -> Result<()>
pub async fn remove_chain(&self, id: &str) -> Result<()>
Remove a chain definition
Sourcepub fn update_config(&mut self, config: ChainConfig)
pub fn update_config(&mut self, config: ChainConfig)
Update chain configuration
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ChainStore
impl !RefUnwindSafe for ChainStore
impl Send for ChainStore
impl Sync for ChainStore
impl Unpin for ChainStore
impl UnwindSafe for ChainStore
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