This commit is contained in:
John Smith
2023-06-19 22:35:49 -04:00
parent cd9a3414cf
commit f17c2f62cb
12 changed files with 222 additions and 137 deletions
@@ -29,6 +29,13 @@ pub enum Destination {
}
impl Destination {
pub fn target(&self) -> Option<NodeRef> {
match self {
Destination::Direct { target, safety_selection: _ } => Some(target.clone()),
Destination::Relay { relay:_, target, safety_selection: _ } => Some(target.clone()),
Destination::PrivateRoute { private_route:_, safety_selection:_ } => None,
}
}
pub fn direct(target: NodeRef) -> Self {
let sequencing = target.sequencing();
Self::Direct {