diff --git a/crates/papyrus_network/src/network_manager/mod.rs b/crates/papyrus_network/src/network_manager/mod.rs index db932279bd..a0d3b3cd13 100644 --- a/crates/papyrus_network/src/network_manager/mod.rs +++ b/crates/papyrus_network/src/network_manager/mod.rs @@ -614,7 +614,8 @@ pub fn dummy_report_sender() -> ReportSender { } pub type GenericSender = Box>; -pub type GenericReceiver = Box>; +// Box implements Stream only if S: Stream + Unpin +pub type GenericReceiver = Box + Unpin>; pub struct SqmrClientQuery> { pub query: Query, @@ -622,7 +623,8 @@ pub struct SqmrClientQuery> { pub responses_sender: GenericSender>::Error>>, } // TODO(shahak): Return this type in register_sqmr_protocol_client -pub type SqmrClientChannel = GenericSender>; +pub type SqmrClientSender = GenericSender>; +type SqmrClientReceiver = GenericReceiver; pub struct SqmrServerQuery> { pub query: Query, @@ -630,7 +632,8 @@ pub struct SqmrServerQuery> { pub responses_sender: GenericSender>::Error>>, } // TODO(shahak): Return this type in register_sqmr_protocol_server -pub type SqmrServerChannel = GenericReceiver>; +pub type SqmrServerReceiver = GenericReceiver>; +type SqmrServerSender = GenericSender; #[allow(dead_code)] struct SqmrClientQueryForNetwork { @@ -638,6 +641,13 @@ struct SqmrClientQueryForNetwork { pub report_receiver: BoxFuture<'static, SessionId>, pub responses_sender: GenericSender, } +impl> From + for SqmrClientQuery +{ + fn from(_query: SqmrClientQueryForNetwork) -> Self { + unimplemented!() + } +} #[allow(dead_code)] struct SqmrServerQueryForNetwork { pub query: Bytes,