use alloc::vec::Vec; use crate::crypto::PublicKey; /// A tunnel that is used for communication pub struct Tunnel { /// Tunnel's id id: Option, /// Ids that are local_ids: Vec, /// Ids of peers (in transport) by which we can send a message - one for backward direction, another for forward peer_ids: (u64, u64), /// Time at which this tunnel should be destroyed (UNIX epoch) ttd: u64, /// Public keys of nodes nodes_in_tunnel: Option>, /// Is this tunnel used for multicast? is_multicast: bool, } /// Tunnel, but only the fields that are ok to share pub struct TunnelPublic { /// Tunnel's id id: Option, /// Ids that are local_ids: Vec, /// Time at which this tunnel should be destroyed (UNIX epoch) ttd: u64, /// Public keys of nodes nodes_in_tunnel: Option>, }