> ## 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.

# RetrievedRecord

> RetrievedRecord — Kinetica Rust API

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

<pre>`pub trait RetrievedRecord:    Sized    + Send    + 'static {    // Required method    fn decode_records(        record_type: &Arc<Type>,        encoded: &[ByteBuf],    ) -> Result<Vec<Self>, KineticaError>;}`</pre>

A record a [`RecordRetriever`](https://docs.kinetica.com/content/api/rust/record_retriever/struct.RecordRetriever) returns, decoded from the Avro binary form the server sends by the [`Type`](https://docs.kinetica.com/content/api/rust/generic_record/struct.Type) the retriever was given.Implemented for [`GenericRecord`](https://docs.kinetica.com/content/api/rust/generic_record/struct.GenericRecord), and for any type serde can deserialize, whose fields are then read by the names in the type’s Avro schema.

## Required Methods

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/record_retriever.rs#L110)
fn [decode\_records](#tymethod.decode_records)( record\_type: &[Arc](https://doc.rust-lang.org/1.98.1/alloc/sync/struct.Arc.html)\<[Type](https://docs.kinetica.com/content/api/rust/generic_record/struct.Type.md)>, encoded: &\[[ByteBuf](https://docs.kinetica.com/content/api/rust/struct.ByteBuf.md)], ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<Self>, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Decodes records of `record_type`. A failure reads “Could not decode object: …”.

## Dyn Compatibility

This trait is not [dyn compatible](https://doc.rust-lang.org/1.98.1/reference/items/traits.html#dyn-compatibility).In older versions of Rust, dyn compatibility was called "object safety".

## Implementors

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/record_retriever.rs#L113-L117)
impl [RetrievedRecord](https://docs.kinetica.com/content/api/rust/record_retriever/trait.RetrievedRecord.md) for [GenericRecord](https://docs.kinetica.com/content/api/rust/generic_record/struct.GenericRecord.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/record_retriever.rs#L119-L129)
impl\<T: [DeserializeOwned](https://docs.rs/serde_core/1.0.228/serde_core/de/trait.DeserializeOwned.html) + [Send](https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html) + 'static> [RetrievedRecord](https://docs.kinetica.com/content/api/rust/record_retriever/trait.RetrievedRecord.md) for T


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