capnproto-rust icon indicating copy to clipboard operation
capnproto-rust copied to clipboard

Is it possible to use Cow* struct in Message fields?

Open TheWaWaR opened this issue 7 years ago • 0 comments

Some pseudocode

let mut address_book = try!(message_reader.get_root::<address_book::Reader>());
let mut people = address_book.get_people()[0];
// Fixed width data, not Cow
people.id = 333;
// Dynamic width data, Cow
people.email = "[email protected]";

// > Then send this changed people to some node in the network.

TheWaWaR avatar Jul 16 '18 03:07 TheWaWaR