feldera_types

Macro deserialize_struct

source
macro_rules! deserialize_struct {
    ($struct:ident($($arg:tt $(: $bound:tt)?),*)[$num_fields:expr]{$($field_name:ident: $type:ty = $default:expr),* }) => { ... };
}
Expand description

Generate DeserializeWithContext implementation parameterized by context type for a struct.

ยงArguments

  • $struct - name of the struct type.
  • $arg - type arguments.
  • $bound - optional trait bound for type argument $arg.
  • $num_fields - the number of struct fields.
  • $field_name - field name.
  • $type - field type.
  • $default - None, or Some(value) for fields that have a default value.