Object API for structs? #8140
-
struct KeyInfo { table RegisterPublicKeyRequest {
Is it OK to use std::move to set requester_keyinfo? I don't see a KeyInfoT class or struct for object API access to structs. Or do I need to use --gen-mutable? I actually don't need to write to the objects more than once, I just want to serialize in a different place and have easy access to the data up to the point of serializing, without having to pass the builder around to finish serializing. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
std::memcpy(req.requester_keyinfo->mutable_ed25519_pubkey()->data(),_sign_public_key,32); |
Beta Was this translation helpful? Give feedback.
-
I fell to the latter, memory is already allocated for KeyInfo, no need to allocate twice. |
Beta Was this translation helpful? Give feedback.
I fell to the latter, memory is already allocated for KeyInfo, no need to allocate twice.