impl HasRelayIds for GuardId.

This commit is contained in:
Nick Mathewson 2022-10-24 11:20:11 -04:00
parent 7d313a12bc
commit 8528d61a78
1 changed files with 9 additions and 0 deletions

View File

@ -64,6 +64,15 @@ impl GuardId {
}
}
impl HasRelayIds for GuardId {
fn identity(
&self,
key_type: tor_linkspec::RelayIdType,
) -> Option<tor_linkspec::RelayIdRef<'_>> {
self.0.identity(key_type)
}
}
/// Implementation type held inside of FirstHopId.
///
/// This exists as a separate type from FirstHopId because Rust requires that a pub enum's variants are all public.