|
18 | 18 |
|
19 | 19 | //! Helper for outgoing light client requests. |
20 | 20 | //! |
21 | | -//! Call `LightClientRequestSender::send_request` to send out light client requests. It will: |
| 21 | +//! Call [`LightClientRequestSender::send_request`] to send out light client requests. It will: |
22 | 22 | //! |
23 | 23 | //! 1. Build the request. |
24 | 24 | //! |
25 | | -//! 2. Forward the request to `crate::request_responses::RequestResponsesBehaviour` via |
26 | | -//! `OutEvent::SendRequest`. |
| 25 | +//! 2. Forward the request to [`crate::request_responses::RequestResponsesBehaviour`] via |
| 26 | +//! [`OutEvent::SendRequest`]. |
27 | 27 | //! |
28 | | -//! 3. Wait for the response and forward the response via the `oneshot::Sender` provided earlier |
29 | | -//! with `LightClientRequestSender::send_request`. |
| 28 | +//! 3. Wait for the response and forward the response via the [`oneshot::Sender`] provided earlier |
| 29 | +//! with [`LightClientRequestSender::send_request`]. |
30 | 30 |
|
31 | 31 | use codec::{self, Encode, Decode}; |
32 | 32 | use crate::{ |
@@ -546,13 +546,13 @@ impl<B: Block> Stream for LightClientRequestSender<B> { |
546 | 546 | /// Events returned by [`LightClientRequestSender`]. |
547 | 547 | #[derive(Debug)] |
548 | 548 | pub enum OutEvent { |
549 | | - /// Emit a request to be send out on the network e.g. via `crate::request_responses`. |
| 549 | + /// Emit a request to be send out on the network e.g. via [`crate::request_responses`]. |
550 | 550 | SendRequest { |
551 | 551 | /// The remote peer to send the request to. |
552 | 552 | target: PeerId, |
553 | 553 | /// The encoded request. |
554 | 554 | request: Vec<u8>, |
555 | | - /// The `onehsot::Sender` channel to pass the response to. |
| 555 | + /// The [`onehsot::Sender`] channel to pass the response to. |
556 | 556 | pending_response: oneshot::Sender<Result<Vec<u8>, RequestFailure>>, |
557 | 557 | /// The name of the protocol to use to send the request. |
558 | 558 | protocol_name: String, |
@@ -643,42 +643,42 @@ pub enum Request<B: Block> { |
643 | 643 | Body { |
644 | 644 | /// Request. |
645 | 645 | request: RemoteBodyRequest<B::Header>, |
646 | | - /// `oneshot::Sender` to return response. |
| 646 | + /// [`oneshot::Sender`] to return response. |
647 | 647 | sender: oneshot::Sender<Result<Vec<B::Extrinsic>, ClientError>> |
648 | 648 | }, |
649 | 649 | /// Remote header request. |
650 | 650 | Header { |
651 | 651 | /// Request. |
652 | 652 | request: light::RemoteHeaderRequest<B::Header>, |
653 | | - /// `oneshot::Sender` to return response. |
| 653 | + /// [`oneshot::Sender`] to return response. |
654 | 654 | sender: oneshot::Sender<Result<B::Header, ClientError>> |
655 | 655 | }, |
656 | 656 | /// Remote read request. |
657 | 657 | Read { |
658 | 658 | /// Request. |
659 | 659 | request: light::RemoteReadRequest<B::Header>, |
660 | | - /// `oneshot::Sender` to return response. |
| 660 | + /// [`oneshot::Sender`] to return response. |
661 | 661 | sender: oneshot::Sender<Result<HashMap<Vec<u8>, Option<Vec<u8>>>, ClientError>> |
662 | 662 | }, |
663 | 663 | /// Remote read child request. |
664 | 664 | ReadChild { |
665 | 665 | /// Request. |
666 | 666 | request: light::RemoteReadChildRequest<B::Header>, |
667 | | - /// `oneshot::Sender` to return response. |
| 667 | + /// [`oneshot::Sender`] to return response. |
668 | 668 | sender: oneshot::Sender<Result<HashMap<Vec<u8>, Option<Vec<u8>>>, ClientError>> |
669 | 669 | }, |
670 | 670 | /// Remote call request. |
671 | 671 | Call { |
672 | 672 | /// Request. |
673 | 673 | request: light::RemoteCallRequest<B::Header>, |
674 | | - /// `oneshot::Sender` to return response. |
| 674 | + /// [`oneshot::Sender`] to return response. |
675 | 675 | sender: oneshot::Sender<Result<Vec<u8>, ClientError>> |
676 | 676 | }, |
677 | 677 | /// Remote changes request. |
678 | 678 | Changes { |
679 | 679 | /// Request. |
680 | 680 | request: light::RemoteChangesRequest<B::Header>, |
681 | | - /// `oneshot::Sender` to return response. |
| 681 | + /// [`oneshot::Sender`] to return response. |
682 | 682 | sender: oneshot::Sender<Result<Vec<(NumberFor<B>, u32)>, ClientError>> |
683 | 683 | } |
684 | 684 | } |
|
0 commit comments