From 8d9aee789d3c4e745f07ee2c7d14d53bf72dc86a Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Tue, 12 May 2026 17:18:00 +0100 Subject: [PATCH] add send to trait method returns --- zingo-netutils/src/globally_public.rs | 12 ++++++------ zingo-netutils/src/lib.rs | 28 +++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/zingo-netutils/src/globally_public.rs b/zingo-netutils/src/globally_public.rs index d5fa3db..ef2090f 100644 --- a/zingo-netutils/src/globally_public.rs +++ b/zingo-netutils/src/globally_public.rs @@ -34,7 +34,7 @@ pub trait TransparentIndexer: Indexer { &mut self, filter: TransparentAddressBlockFilter, timeout: Duration, - ) -> impl Future, tonic::Status>>; + ) -> impl Future, tonic::Status>> + Send; /// Return a stream of transactions for a transparent address in a block range. /// @@ -43,7 +43,7 @@ pub trait TransparentIndexer: Indexer { &mut self, filter: TransparentAddressBlockFilter, timeout: Duration, - ) -> impl Future, tonic::Status>>; + ) -> impl Future, tonic::Status>> + Send; /// Return the total confirmed balance for the given transparent addresses. /// @@ -53,7 +53,7 @@ pub trait TransparentIndexer: Indexer { &mut self, addresses: AddressList, timeout: Duration, - ) -> impl Future>; + ) -> impl Future> + Send; /// Return the total confirmed balance by streaming addresses to the server. /// @@ -64,7 +64,7 @@ pub trait TransparentIndexer: Indexer { fn get_taddress_balance_stream( &mut self, addresses: Vec
, - ) -> impl Future>; + ) -> impl Future> + Send; /// Return UTXOs for the given addresses as a single response. /// @@ -74,7 +74,7 @@ pub trait TransparentIndexer: Indexer { &mut self, arg: GetAddressUtxosArg, timeout: Duration, - ) -> impl Future>; + ) -> impl Future> + Send; /// Return a stream of UTXOs for the given addresses. /// @@ -86,7 +86,7 @@ pub trait TransparentIndexer: Indexer { timeout: Duration, ) -> impl Future< Output = Result, tonic::Status>, - >; + > + Send; } impl TransparentIndexer for GrpcIndexer { diff --git a/zingo-netutils/src/lib.rs b/zingo-netutils/src/lib.rs index bacf778..0d7324b 100644 --- a/zingo-netutils/src/lib.rs +++ b/zingo-netutils/src/lib.rs @@ -81,13 +81,13 @@ pub trait Indexer { /// The returned [`LightdInfo`] includes the chain name, current block height, /// server version, and consensus branch ID. Callers should not cache this /// value across sync boundaries as the block height is a point-in-time snapshot. - fn get_lightd_info(&mut self, timeout: Duration) -> impl Future>; + fn get_lightd_info(&mut self, timeout: Duration) -> impl Future> + Send; /// Return the height and hash of the chain tip. /// /// The returned [`BlockId`] identifies the most recent block the server /// is aware of. The hash may be omitted by some implementations. - fn get_latest_block(&mut self, timeout: Duration) -> impl Future>; + fn get_latest_block(&mut self, timeout: Duration) -> impl Future> + Send; /// Submit a raw transaction to the network. /// @@ -99,7 +99,7 @@ pub trait Indexer { &mut self, tx: RawTransaction, timeout: Duration, - ) -> impl Future>; + ) -> impl Future> + Send; /// Fetch the note commitment tree state for the given block. /// @@ -110,7 +110,7 @@ tx: RawTransaction, timeout: Duration, &mut self, block_id: BlockId, timeout: Duration, - ) -> impl Future>; + ) -> impl Future> + Send; /// Return the compact block at the given height. /// @@ -120,7 +120,7 @@ tx: RawTransaction, timeout: Duration, &mut self, block_id: BlockId, timeout: Duration, - ) -> impl Future>; + ) -> impl Future> + Send; /// Return the compact block at the given height, containing only nullifiers. /// @@ -131,7 +131,7 @@ tx: RawTransaction, timeout: Duration, &mut self, block_id: BlockId, timeout: Duration, - ) -> impl Future>; + ) -> impl Future> + Send; /// Return a stream of consecutive compact blocks for the given range. /// @@ -146,7 +146,7 @@ tx: RawTransaction, timeout: Duration, &mut self, range: BlockRange, timeout: Duration, - ) -> impl Future, tonic::Status>>; + ) -> impl Future, tonic::Status>> + Send; /// Return a stream of consecutive compact blocks (nullifiers only) for the given range. /// @@ -158,7 +158,7 @@ tx: RawTransaction, timeout: Duration, &mut self, range: BlockRange, timeout: Duration, - ) -> impl Future, tonic::Status>>; + ) -> impl Future, tonic::Status>> + Send; /// Return the full serialized transaction matching the given filter. /// @@ -169,7 +169,7 @@ tx: RawTransaction, timeout: Duration, &mut self, filter: TxFilter, timeout: Duration, - ) -> impl Future>; + ) -> impl Future> + Send; /// Return a stream of compact transactions currently in the mempool. /// @@ -180,7 +180,7 @@ tx: RawTransaction, timeout: Duration, &mut self, request: GetMempoolTxRequest, timeout: Duration, - ) -> impl Future, tonic::Status>>; + ) -> impl Future, tonic::Status>> + Send; /// Return a stream of raw mempool transactions. /// @@ -189,7 +189,7 @@ tx: RawTransaction, timeout: Duration, fn get_mempool_stream( &mut self, timeout: Duration, - ) -> impl Future, tonic::Status>>; + ) -> impl Future, tonic::Status>> + Send; /// Return the note commitment tree state at the chain tip. /// @@ -198,7 +198,7 @@ tx: RawTransaction, timeout: Duration, fn get_latest_tree_state( &mut self, timeout: Duration, - ) -> impl Future>; + ) -> impl Future> + Send; /// Return a stream of subtree roots for the given shielded protocol. /// @@ -208,7 +208,7 @@ tx: RawTransaction, timeout: Duration, &mut self, arg: GetSubtreeRootsArg, timeout: Duration, - ) -> impl Future, tonic::Status>>; + ) -> impl Future, tonic::Status>> + Send; /// Simulate server latency for testing. /// @@ -221,7 +221,7 @@ tx: RawTransaction, timeout: Duration, &mut self, duration: ProtoDuration, timeout: Duration, - ) -> impl Future>; + ) -> impl Future> + Send; } /// gRPC-backed [`Indexer`] that connects to a Zcash chain indexer (server).