mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-04-25 11:02:12 +00:00
protocols/req-resp: Document uniqueness of RequestIds (#1943)
This commit is contained in:
parent
6d0773b68e
commit
1a01dd16cb
@ -230,6 +230,12 @@ impl<TResponse> ResponseChannel<TResponse> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The ID of an inbound or outbound request.
|
/// The ID of an inbound or outbound request.
|
||||||
|
///
|
||||||
|
/// Note: [`RequestId`]'s uniqueness is only guaranteed between two
|
||||||
|
/// inbound and likewise between two outbound requests. There is no
|
||||||
|
/// uniqueness guarantee in a set of both inbound and outbound
|
||||||
|
/// [`RequestId`]s nor in a set of inbound or outbound requests
|
||||||
|
/// originating from different [`RequestResponse`] behaviours.
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
pub struct RequestId(u64);
|
pub struct RequestId(u64);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user