Skip to main content
pub trait KineticaRecord: Serialize 
    // Required methods
    fn avro_schema(&self) -> &‘static str;
fn type_properties() -> HashMap<String, Vec<String>>;

    // Provided method
    fn use_compression() -> bool …

Trait that must be implemented by all types that can be inserted into Kinetica.

This trait is automatically implemented for all generated request types. Custom record types must implement this to work with BulkInserter.

Note: Types implementing this trait must also implement serde::Serialize for Avro encoding to work.

Example (Manual JSON - Legacy)

Required Methods

Source

fn avro_schema(&self) -> &‘static str

Returns the Avro schema as a JSON string for this record type.

Returns type properties including field types and attributes (e.g., primary_key).

Provided Methods

Whether requests of this type are Snappy-compressed when the client has KineticaOptions::use_snappy enabled.

Compression is opt-in per endpoint, not global: only the endpoints that carry bulk record payloads pay the CPU cost of compressing, and the rest go out as application/octet-stream. The generator overrides this for /insert/records and /update/records; every other request type keeps the default.

Dyn Compatibility

This trait is not dyn compatible.

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

Implementors