Re-export throttled-specific response channel (#1902)

This commit is contained in:
David Craven 2021-01-04 18:45:01 +01:00 committed by GitHub
parent 47c5c80433
commit 6a85eb46fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,9 +52,10 @@ use super::{
RequestResponseConfig,
RequestResponseEvent,
RequestResponseMessage,
ResponseChannel
};
pub type ResponseChannel<R> = super::ResponseChannel<Message<R>>;
/// A wrapper around [`RequestResponse`] which adds request limits per peer.
pub struct Throttled<C>
where
@ -304,7 +305,7 @@ where
/// Answer an inbound request with a response.
///
/// See [`RequestResponse::send_response`] for details.
pub fn send_response(&mut self, ch: ResponseChannel<Message<C::Response>>, res: C::Response)
pub fn send_response(&mut self, ch: ResponseChannel<C::Response>, res: C::Response)
-> Result<(), C::Response>
{
log::trace!("{:08x}: sending response {} to peer {}", self.id, ch.request_id(), &ch.peer);