@@ -25,8 +25,9 @@ const STANDARD_DOMAIN_SEP: &str = "libp2p-peer-record";
2525/// - **Legacy format** (default methods): Compatible with existing Rust libp2p deployments
2626/// - **Standard format** (`*_interop` methods): Compatible with Go and JavaScript implementations
2727///
28- /// Use the `*_interop` variants (e.g., [`PeerRecord::new_interop`], [`PeerRecord::from_signed_envelope_interop`])
29- /// when you need to exchange peer records with non-Rust libp2p implementations.
28+ /// Use the `*_interop` variants (e.g., [`PeerRecord::new_interop`],
29+ /// [`PeerRecord::from_signed_envelope_interop`]) when you need to exchange peer records with
30+ /// non-Rust libp2p implementations.
3031#[ derive( Debug , PartialEq , Eq , Clone ) ]
3132pub struct PeerRecord {
3233 peer_id : PeerId ,
@@ -49,12 +50,14 @@ impl PeerRecord {
4950 /// If this function succeeds, the [`SignedEnvelope`] contained a peer record with a valid
5051 /// signature and can hence be considered authenticated.
5152 ///
52- /// For cross-implementation compatibility with Go/JS libp2p, use [`Self::from_signed_envelope_interop`].
53+ /// For cross-implementation compatibility with Go/JS libp2p, use
54+ /// [`Self::from_signed_envelope_interop`].
5355 pub fn from_signed_envelope ( envelope : SignedEnvelope ) -> Result < Self , FromEnvelopeError > {
5456 Self :: from_signed_envelope_impl ( envelope, LEGACY_DOMAIN_SEP , LEGACY_PAYLOAD_TYPE . as_bytes ( ) )
5557 }
5658
57- /// Attempt to re-construct a [`PeerRecord`] from a [`SignedEnvelope`] using standard interop format.
59+ /// Attempt to re-construct a [`PeerRecord`] from a [`SignedEnvelope`] using standard interop
60+ /// format.
5861 ///
5962 /// Uses the standard libp2p-peer-record format for cross-implementation compatibility
6063 /// with Go and JavaScript libp2p implementations.
@@ -100,7 +103,8 @@ impl PeerRecord {
100103 } )
101104 }
102105
103- /// Construct a new [`PeerRecord`] by authenticating the provided addresses with the given key using legacy format.
106+ /// Construct a new [`PeerRecord`] by authenticating the provided addresses with the given key
107+ /// using legacy format.
104108 ///
105109 /// Uses the legacy routing-state-record format for backward compatibility with existing
106110 /// Rust libp2p deployments.
@@ -118,7 +122,8 @@ impl PeerRecord {
118122 )
119123 }
120124
121- /// Construct a new [`PeerRecord`] by authenticating the provided addresses with the given key using standard interop format.
125+ /// Construct a new [`PeerRecord`] by authenticating the provided addresses with the given key
126+ /// using standard interop format.
122127 ///
123128 /// Uses the standard libp2p-peer-record format for cross-implementation compatibility
124129 /// with Go and JavaScript libp2p implementations.
0 commit comments