Skip to main content

FieldWrite

Trait FieldWrite 

Source
pub trait FieldWrite {
    // Required methods
    fn write_field(
        &self,
        b: BinaryObjectBuilder,
        name: &str,
    ) -> BinaryObjectBuilder;
    fn field_type_code() -> i32;
}
Expand description

Serialise a single field’s value into a BinaryObjectBuilder.

Required Methods§

Source

fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder

Write self as field name, returning the builder for chaining.

Source

fn field_type_code() -> i32

The Ignite wire type code for this field’s value.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl FieldWrite for BigDecimal

Source§

impl FieldWrite for HashMap<String, i32>

Source§

impl FieldWrite for String

Source§

impl FieldWrite for Uuid

Source§

impl FieldWrite for Vec<String>

Maps onto Ignite’s STRING_ARRAY, which is nullable-element (Vec<Option<String>> at the IgniteValue level). Writing produces an array with every element present (Some); reading a null element is a TypeMismatch (expected "String", got "Null") since Vec<String> has no representation for an absent element — use Vec<Option<String>> directly (not yet implemented) if nulls must round-trip.

Source§

impl FieldWrite for Vec<i32>

Source§

impl FieldWrite for bool

Source§

impl FieldWrite for f32

Source§

impl FieldWrite for f64

Source§

impl FieldWrite for i8

Source§

impl FieldWrite for i16

Source§

impl FieldWrite for i32

Source§

impl FieldWrite for i64

Source§

impl<T: FieldWrite> FieldWrite for Option<T>

None writes as IgniteValue::Null (the field is present but null, rather than omitted) so the schema always includes it. On read, both a null value and a missing field map to None.

Implementors§