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§
Sourcefn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
Write self as field name, returning the builder for chaining.
Sourcefn field_type_code() -> i32
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
impl FieldWrite for BigDecimal
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for HashMap<String, i32>
impl FieldWrite for HashMap<String, i32>
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for String
impl FieldWrite for String
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for Uuid
impl FieldWrite for Uuid
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
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.
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.
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for Vec<i32>
impl FieldWrite for Vec<i32>
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for bool
impl FieldWrite for bool
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for f32
impl FieldWrite for f32
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for f64
impl FieldWrite for f64
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for i8
impl FieldWrite for i8
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for i16
impl FieldWrite for i16
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for i32
impl FieldWrite for i32
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
Source§impl FieldWrite for i64
impl FieldWrite for i64
fn write_field(&self, b: BinaryObjectBuilder, name: &str) -> BinaryObjectBuilder
fn field_type_code() -> i32
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.
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.