1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2026 DeRec Alliance. All rights reserved.
/// Structural validation for a decoded [`PrePairRequestMessage`], attached
/// as a method the same way [`ContactMessageExt`](super::contact_message::ContactMessageExt) and
/// [`PairRequestMessageExt`](super::pair_request::PairRequestMessageExt) attach it to their messages.
///
/// Sidesteps the orphan rule: the message is generated in `derec-proto`, so
/// the check cannot be an inherent method. Bring the trait into scope
/// (`use crate::extensions::pre_pair_request::PrePairRequestMessageExt as _;`) and call
/// `request.validate()?` before handing a peer-supplied request to protocol
/// code.
pub