Skip to main content

FieldDecode

Trait FieldDecode 

Source
pub trait FieldDecode<'a>: Sized {
    // Required method
    fn decode(field: FieldView<'a>) -> Option<Self>;
}
Expand description

Decodes a typed value from an encoded message, array, or map field.

Required Methods§

Source

fn decode(field: FieldView<'a>) -> Option<Self>

Returns None when the field does not have the expected shape.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, T: Scalar> FieldDecode<'a> for T

Source§

impl<'a> FieldDecode<'a> for ArrayView<'a>

Source§

impl<'a> FieldDecode<'a> for MapView<'a>

Source§

impl<'a> FieldDecode<'a> for MessageView<'a>

Source§

impl<'a> FieldDecode<'a> for StringView<'a>