Trait SetField

Source
pub trait SetField<F> {
    // Required method
    fn set_with<'a, V>(
        &'a mut self,
        field: F,
        value: V,
        setting: V::SerializeSettings,
    )
       where V: FieldType<'a>;

    // Provided method
    fn set<'a, V>(&'a mut self, field: F, value: V)
       where V: FieldType<'a> { ... }
}
Expand description

Allows to write FIX fields.

Required Methods§

Source

fn set_with<'a, V>( &'a mut self, field: F, value: V, setting: V::SerializeSettings, )
where V: FieldType<'a>,

Writes a field with custom FieldType::SerializeSettings.

Provided Methods§

Source

fn set<'a, V>(&'a mut self, field: F, value: V)
where V: FieldType<'a>,

Writes a field with default FieldType::SerializeSettings.

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.

Implementors§

Source§

impl<'a, B> SetField<u32> for EncoderHandle<'a, B>
where B: Buffer,

Source§

impl<'a, B> SetField<NonZero<u32>> for EncoderHandle<'a, B>
where B: Buffer,

Source§

impl<'a, B, F> SetField<&F> for EncoderHandle<'a, B>
where B: Buffer, F: IsFieldDefinition,