protocols/req-resp: Document uniqueness of RequestIds (#1943)

This commit is contained in:
Max Inden 2021-02-01 14:32:47 +01:00 committed by GitHub
parent 6d0773b68e
commit 1a01dd16cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);