[][src]Struct pikmin::writer::db_mysql::TableDef

pub struct TableDef(_, _);

A definition for MySQL. First value is a name of the column, and 2nd is a following definition in a CREATE TABLE statement.

Example

use pikmin::writer::db_mysql::TableDef;
fn table_def() -> Vec<TableDef> {
    vec![
        TableDef::new("id", "BIGINT NOT NULL PRIMARY KEY"),
        TableDef::new("traded_at", "TIMESTAMP(3) NOT NULL"),
        TableDef::new("amount", "FLOAT NOT NULL"),
        TableDef::new("price", "FLOAT NOT NULL"),
    ]
}

Methods

impl TableDef[src]

pub fn new(s1: &str, s2: &str) -> Self[src]

Creates a column of a table definition.

Trait Implementations

impl Debug for TableDef[src]

Auto Trait Implementations

impl Send for TableDef

impl Sync for TableDef

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> Same<T> for T

type Output = T

Should always be Self