Skip to content
#
macros
1 article tagged
#macros
.
All tags
→
Oct 12, 2019
The builder pattern, and a macro that keeps FFI code DRY
Our ping API is simple, but it’s also very limited: pub fn ping(dest: ipv4::Addr) -> Result<(), String>. // called as: ping(ipv4::Addr([8, 8, 8, 8])).unwrap(); It doesn’t allow specifying the TTL…
12 min