example code for "Cap'n Proto and Rust: Type Systems for Sharing"