Rust Encoding-decoding Resources