> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# encode_single

> encode_single — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[avro](https://docs.kinetica.com/content/api/rust/avro/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro.rs#L363-L368)&#x20;

<pre>`pub fn encode_single<T: Serialize>(    schema: &Schema,    record: &T,) -> Result<Vec<u8>, KineticaError>`</pre>

Encodes a single record to Avro binary format.Useful for encoding individual records without batch overhead.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.