MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / subscribe

Method subscribe

fendermint/eth/api/src/client.rs:84–93  ·  view source on GitHub ↗
(&self, query: Query)

Source from the content-addressed store, hash-verified

82#[async_trait]
83impl SubscriptionClient for HybridClient {
84 async fn subscribe(&self, query: Query) -> Result<Subscription, Error> {
85 let (tx, rx) = tokio::sync::oneshot::channel();
86
87 self.cmd_tx
88 .send(DriverCommand::Subscribe(query, tx))
89 .map_err(|_| Error::channel_send())?;
90
91 rx.await
92 .map_err(|e| Error::client_internal(e.to_string()))?
93 }
94
95 async fn unsubscribe(&self, query: Query) -> Result<(), Error> {
96 let (tx, rx) = tokio::sync::oneshot::channel();

Callers 4

new_filter_driverMethod · 0.45
tx_cache_clearing_loopFunction · 0.45
runMethod · 0.45
start_legacy_topdownFunction · 0.45

Calls 2

to_stringMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected