2026-04-26 12:39:06 -06:00
|
|
|
#![no_std]
|
|
|
|
|
|
2026-05-28 18:17:01 -06:00
|
|
|
pub extern crate alloc;
|
2026-04-26 12:39:06 -06:00
|
|
|
|
2026-05-28 12:41:32 -06:00
|
|
|
mod endpoint;
|
|
|
|
|
mod error;
|
2026-05-28 18:17:01 -06:00
|
|
|
mod leaf;
|
2026-05-28 12:41:32 -06:00
|
|
|
mod packet;
|
|
|
|
|
|
2026-05-28 14:46:47 -06:00
|
|
|
pub use endpoint::{Endpoint, HookID};
|
2026-05-28 12:41:32 -06:00
|
|
|
pub use error::*;
|
2026-05-28 18:17:01 -06:00
|
|
|
pub use leaf::*;
|
2026-05-28 12:41:32 -06:00
|
|
|
pub use packet::Packet;
|
|
|
|
|
|
|
|
|
|
// Various named types used for brevity
|
|
|
|
|
use alloc::{
|
|
|
|
|
collections::{btree_map::BTreeMap, btree_set::BTreeSet, vec_deque::VecDeque},
|
|
|
|
|
vec::Vec,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
type Path = Vec<u32>;
|
|
|
|
|
type EndpointName = u32;
|
|
|
|
|
type ConnectionSet = BTreeSet<(EndpointName, bool)>;
|
|
|
|
|
type HookMap = BTreeMap<HookID, EndpointName>;
|
2026-05-28 18:17:01 -06:00
|
|
|
pub type PacketQueue = VecDeque<Packet>;
|
2026-05-28 12:41:32 -06:00
|
|
|
type RouteMap = BTreeMap<EndpointName, PacketQueue>;
|
2026-05-27 11:04:22 -06:00
|
|
|
|
|
|
|
|
#[cfg(test)]
|
2026-05-28 12:41:32 -06:00
|
|
|
mod tests {
|
2026-05-28 13:15:24 -06:00
|
|
|
mod merkle_sync;
|
2026-05-28 12:41:32 -06:00
|
|
|
mod oneshot;
|
|
|
|
|
mod packet;
|
|
|
|
|
}
|