mesh_protobuf::oneof

Trait OneofDecode

Source
pub trait OneofDecode<'de, R>: Sized {
    // Required method
    fn read_variant(
        this: &mut InplaceOption<'_, Self>,
        number: u32,
        reader: FieldReader<'de, '_, R>,
    ) -> Result<()>;
}
Expand description

A trait for decoding a oneof field.

Required Methods§

Source

fn read_variant( this: &mut InplaceOption<'_, Self>, number: u32, reader: FieldReader<'de, '_, R>, ) -> Result<()>

Read the specified variant from the reader.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'encoding, T, U, AnyR: 'static> OneofDecode<'encoding, AnyR> for Result<T, U>
where T: DefaultEncoding, T::Encoding: FieldDecode<'encoding, T, AnyR>, U: DefaultEncoding, U::Encoding: FieldDecode<'encoding, U, AnyR>,

Source§

fn read_variant( item: &mut InplaceOption<'_, Self>, n: u32, field: FieldReader<'encoding, '_, AnyR>, ) -> Result<()>

Implementors§