Type

Enum Type 

pub enum Type {
Show 42 variants Serial, Bit(NumericAttr), TinyInt(NumericAttr), Bool, SmallInt(NumericAttr), MediumInt(NumericAttr), Int(NumericAttr), BigInt(NumericAttr), Decimal(NumericAttr), Float(NumericAttr), Double(NumericAttr), Date, Time(TimeAttr), DateTime(TimeAttr), Timestamp(TimeAttr), Year, Char(StringAttr), NChar(StringAttr), Varchar(StringAttr), NVarchar(StringAttr), Binary(StringAttr), Varbinary(StringAttr), Text(StringAttr), TinyText(StringAttr), MediumText(StringAttr), LongText(StringAttr), Blob(BlobAttr), TinyBlob, MediumBlob, LongBlob, Enum(EnumDef), Set(SetDef), Geometry(GeometryAttr), Point(GeometryAttr), LineString(GeometryAttr), Polygon(GeometryAttr), MultiPoint(GeometryAttr), MultiLineString(GeometryAttr), MultiPolygon(GeometryAttr), GeometryCollection(GeometryAttr), Json, Unknown(String),
}
Expand description

All built-in types of MySQL, excluding synonyms

Variants§

§

Serial

§

Bit(NumericAttr)

§

TinyInt(NumericAttr)

§

Bool

§

SmallInt(NumericAttr)

§

MediumInt(NumericAttr)

§

Int(NumericAttr)

§

BigInt(NumericAttr)

§

Decimal(NumericAttr)

§

Float(NumericAttr)

§

Double(NumericAttr)

§

Date

§

Time(TimeAttr)

§

DateTime(TimeAttr)

§

Timestamp(TimeAttr)

§

Year

§

Char(StringAttr)

§

NChar(StringAttr)

§

Varchar(StringAttr)

§

NVarchar(StringAttr)

§

Binary(StringAttr)

§

Varbinary(StringAttr)

§

Text(StringAttr)

§

TinyText(StringAttr)

§

MediumText(StringAttr)

§

LongText(StringAttr)

§

Blob(BlobAttr)

§

TinyBlob

§

MediumBlob

§

LongBlob

§

Enum(EnumDef)

§

Set(SetDef)

§

Geometry(GeometryAttr)

§

Point(GeometryAttr)

§

LineString(GeometryAttr)

§

Polygon(GeometryAttr)

§

MultiPoint(GeometryAttr)

§

MultiLineString(GeometryAttr)

§

MultiPolygon(GeometryAttr)

§

GeometryCollection(GeometryAttr)

§

Json

§

Unknown(String)

Implementations§

§

impl Type

pub fn is_numeric(&self) -> bool

pub fn is_date(&self) -> bool

pub fn is_time(&self) -> bool

pub fn is_string(&self) -> bool

pub fn is_blob(&self) -> bool

pub fn is_free_size_blob(&self) -> bool

pub fn is_geometry(&self) -> bool

pub fn is_enum(&self) -> bool

pub fn is_set(&self) -> bool

pub fn is_other(&self) -> bool

pub fn is_unknown(&self) -> bool

pub fn get_numeric_attr_mut(&mut self) -> &mut NumericAttr

pub fn get_time_attr_mut(&mut self) -> &mut TimeAttr

pub fn get_string_attr_mut(&mut self) -> &mut StringAttr

pub fn get_blob_attr_mut(&mut self) -> &mut BlobAttr

pub fn get_enum_def_mut(&mut self) -> &mut EnumDef

pub fn get_set_def_mut(&mut self) -> &mut SetDef

pub fn get_geometry_attr_mut(&mut self) -> &mut GeometryAttr

§

impl Type

pub fn write_numeric_attr(s: &mut String, num: &NumericAttr)

pub fn write_time_attr(s: &mut String, attr: &TimeAttr)

pub fn write_string_attr(s: &mut String, attr: &StringAttr)

pub fn write_blob_attr(s: &mut String, attr: &BlobAttr)

pub fn write_enum_def(s: &mut String, def: &EnumDef)

pub fn write_set_def(s: &mut String, def: &SetDef)

pub fn write_geometry_attr(s: &mut String, attr: &GeometryAttr)

Trait Implementations§

§

impl Clone for Type

§

fn clone(&self) -> Type

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Type

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Iden for Type

§

fn quoted(&self) -> Cow<'static, str>

Return the to-be sanitized version of the identifier. Read more
§

fn unquoted(&self) -> &str

Write a raw identifier string without quotes. Read more
Source§

fn to_string(&self) -> String

A shortcut for writing an unquoted identifier into a String. Read more
§

impl PartialEq for Type

§

fn eq(&self, other: &Type) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

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

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<I> IdenList for I
where I: IntoIden,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoColumnRef for T
where T: Into<ColumnRef>,

Source§

impl<T> IntoIden for T
where T: Into<DynIden>,

Source§

impl<T> IntoIndexColumn for T
where T: Into<IndexColumn>,

Source§

impl<T> IntoTableRef for T
where T: Into<TableRef>,

Source§

impl<T> IntoTypeRef for T
where T: Into<TypeRef>,

Source§

impl<T> MaybeQualifiedOnce for T
where T: IntoIden,

Source§

fn into_2_parts(self) -> (Option<DynIden>, DynIden)

Represent a maybe-qualified name as a (foo?, bar) tuple.
Source§

impl<T> MaybeQualifiedTwice for T

Source§

fn into_3_parts(self) -> (Option<(Option<DynIden>, DynIden)>, DynIden)

Represent a maybe-qualified name as a (foo?, bar?, baz) tuple. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.