Enum barrel::types::BaseType[][src]

pub enum BaseType {
Show 20 variants Text, Varchar(usize), Char(usize), Primary, Integer, Serial, Float, Double, UUID, Boolean, Json, Date, Time, DateTime, Binary, Foreign(Option<String>, StringWrapVec<String>, ReferentialActionReferentialAction), Custom(&'static str), Array(Box<BaseType>), Index(Vec<String>), Constraint(Constraint, Vec<String>),
}
Expand description

Core type enum, describing the basic type

Variants

Text

A string blob, stored in the heap with a pointer in the row

Varchar(usize)

Variable-length string that (hopefully) is stored to the row

Tuple Fields of Varchar

0: usize
Char(usize)

Fixed-length string that is stored to the row

Tuple Fields of Char

0: usize
Primary

Primary key (utility for incrementing integer – postgres supports this, we just mirror it)

Integer

Simple integer

Serial

An integer that as a default value of the next biggest number

Float

Floating point number

Double

Like Float but ~ ~ d o u b l e p r e c i s i o n ~ ~

UUID

A unique identifier type

Boolean

True or False

Json

Json encoded data

Date

Date

Time

Date

DateTime

Date and time

Binary

Foreign key to other table

Tuple Fields of Foreign

0: Option<String>1: String2: WrapVec<String>3: ReferentialAction4: ReferentialAction
Custom(&'static str)

I have no idea what you are – but I like it

Tuple Fields of Custom

0: &'static str
Array(Box<BaseType>)

Any of the above, but many of them

Tuple Fields of Array

0: Box<BaseType>
Index(Vec<String>)

Indexing over multiple columns

Tuple Fields of Index

0: Vec<String>
Constraint(Constraint, Vec<String>)

Indexing over multiple columns

Tuple Fields of Constraint

0: Constraint1: Vec<String>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.