[][src]Trait cql_model::CqlType

pub trait CqlType {
    type ValueType;

    const VALUE_SIZE: usize;
}

The base CQL Value Type

All read/writable types to a CQL Database should derive from this.

Examples

This declares a CQL Type to read/write Strings of a maximum length of 255 bytes from the database:

pub struct TinyText;

impl CqlType for TinyText {
    type ValueType = String;
    const VALUE_SIZE: usize = 255;
}

Associated Types

type ValueType

The type of value to read/write from the database.

Loading content...

Associated Constants

const VALUE_SIZE: usize

The (maximum) size of the value to read/write from the database.

Loading content...

Implementors

Loading content...