Trait mesh::payload::oneof::OneofEncode
source · pub trait OneofEncode<R> {
// Required methods
fn write_variant(self, writer: MessageWriter<'_, '_, R>);
fn compute_variant_size(&mut self, sizer: MessageSizer<'_>);
}
Expand description
A trait for encoding a oneof
field.
Required Methods§
sourcefn write_variant(self, writer: MessageWriter<'_, '_, R>)
fn write_variant(self, writer: MessageWriter<'_, '_, R>)
Write the variant to the writer.
sourcefn compute_variant_size(&mut self, sizer: MessageSizer<'_>)
fn compute_variant_size(&mut self, sizer: MessageSizer<'_>)
Compute the size of the variant.