more route work

This commit is contained in:
John Smith
2022-10-20 23:11:41 -04:00
parent fc6eb6e84a
commit c8ba88fb99
8 changed files with 171 additions and 77 deletions
@@ -81,6 +81,25 @@ impl Destination {
},
}
}
pub fn get_safety_spec(&self) -> &Option<SafetySpec> {
match self {
Destination::Direct {
target: _,
safety_spec,
} => safety_spec,
Destination::Relay {
relay: _,
target: _,
safety_spec,
} => safety_spec,
Destination::PrivateRoute {
private_route: _,
safety_spec,
reliable: _,
} => safety_spec,
}
}
}
impl fmt::Display for Destination {