Finish the build producing a [`PeerKey`].
(self)
| 248 | impl Builder<WithAddresses<'_>> { |
| 249 | /// Finish the build producing a [`PeerKey`]. |
| 250 | pub fn build(self) -> PeerKey { |
| 251 | let entry = PeerEntry::new( |
| 252 | self.state.node_key.id(), |
| 253 | self.state.expiration, |
| 254 | self.state.addresses, |
| 255 | ); |
| 256 | PeerKey::from_entry(&entry, self.state.node_key) |
| 257 | .expect("builder should not build invalid peer key") |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | #[cfg(test)] |