Generic, flexible networking middleware in Rust