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

# AvroType

> AvroType — Kinetica Rust API

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

<pre>`pub enum AvroType {    Int,    Long,    Float,    Double,    String,    Boolean,    Bytes,    Nullable(Box<AvroType>),}`</pre>

Avro primitive and complex types supported by Kinetica

## Variants

### Int

32-bit signed integer

### Long

64-bit signed integer

### Float

32-bit IEEE 754 floating-point

### Double

64-bit IEEE 754 floating-point

### String

Unicode string

### Boolean

A Kinetica boolean, which is an Avro `int` (the column also takes the `boolean` property): Kinetica has no Avro `boolean`, and refuses a type with one (“Invalid type "boolean"”). A Rust `bool` must be written as an int for it: see [`bool_as_int`](https://docs.kinetica.com/content/api/rust/avro_schema_builder/bool_as_int/index).

### Bytes

Sequence of bytes

### Nullable([Box](https://doc.rust-lang.org/1.98.1/alloc/boxed/struct.Box.html)\<[AvroType](https://docs.kinetica.com/content/api/rust/avro_schema_builder/enum.AvroType.md)>)

Nullable type: a union of the type and null, in that order, as the server keeps a nullable column’s type.

## Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L49-L74)
impl [AvroType](https://docs.kinetica.com/content/api/rust/avro_schema_builder/enum.AvroType.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L71-L73)
pub fn [nullable](#method.nullable)(self) -> Self

Creates a nullable version of this type

## Trait Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L25)
impl [Clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html) for [AvroType](https://docs.kinetica.com/content/api/rust/avro_schema_builder/enum.AvroType.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L25)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [AvroType](https://docs.kinetica.com/content/api/rust/avro_schema_builder/enum.AvroType.md)

Returns a duplicate of the value. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/142757)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/clone.rs.html#245-247)
fn [clone\_from](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)(\&mut self, source: \&Self)

Performs copy-assignment from `source`. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L25)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [AvroType](https://docs.kinetica.com/content/api/rust/avro_schema_builder/enum.AvroType.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L25)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)(\&self, f: \&mut [Formatter](https://doc.rust-lang.org/1.98.1/core/fmt/struct.Formatter.html)\<'\_>) -> [Result](https://doc.rust-lang.org/1.98.1/core/fmt/type.Result.html)

Formats the value using the given formatter. [Read more](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L25)
impl [PartialEq](https://doc.rust-lang.org/1.98.1/core/cmp/trait.PartialEq.html) for [AvroType](https://docs.kinetica.com/content/api/rust/avro_schema_builder/enum.AvroType.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L25)
fn [eq](https://doc.rust-lang.org/1.98.1/core/cmp/trait.PartialEq.html#tymethod.eq)(\&self, other: &[AvroType](https://docs.kinetica.com/content/api/rust/avro_schema_builder/enum.AvroType.md)) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Tests for `self` and `other` values to be equal, and is used by `==`.

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/143800)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/cmp.rs.html#263)
fn [ne](https://doc.rust-lang.org/1.98.1/core/cmp/trait.PartialEq.html#method.ne)(\&self, other: [\&Rhs](https://doc.rust-lang.org/1.98.1/std/primitive.reference.html)) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Tests for `!=`. The default implementation is almost always sufficient, and should not be overridden without very good reason.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L25)
impl [StructuralPartialEq](https://doc.rust-lang.org/1.98.1/core/marker/trait.StructuralPartialEq.html) for [AvroType](https://docs.kinetica.com/content/api/rust/avro_schema_builder/enum.AvroType.md)


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