pub struct ColumnDefinitionBuilder<N = NoConstraint, P = NoConstraint, U = NoConstraint, D = NoConstraint, R = NoConstraint, C = NoConstraint>where
    N: NullabilityConstraint,
    P: PrimaryKeyConstraint,
    U: UniqueConstraint,
    D: DefaultConstraint,
    R: ReferencesConstraint,
    C: CheckConstraint,{ /* private fields */ }

Implementations§

source§

impl<P, U, D, R, C> ColumnDefinitionBuilder<NoConstraint, P, U, D, R, C>where P: PrimaryKeyConstraint, U: UniqueConstraint, D: DefaultConstraint, R: ReferencesConstraint, C: CheckConstraint,

source

pub fn null(self) -> ColumnDefinitionBuilder<IsNull, P, U, D, R, C>

source

pub fn not_null(self) -> ColumnDefinitionBuilder<IsNotNull, P, U, D, R, C>

source§

impl<N, U, D, R, C> ColumnDefinitionBuilder<N, NoConstraint, U, D, R, C>where N: NullabilityConstraint, U: UniqueConstraint, D: DefaultConstraint, R: ReferencesConstraint, C: CheckConstraint,

source

pub fn primary_key(self) -> ColumnDefinitionBuilder<N, IsPrimaryKey, U, D, R, C>

source§

impl<N, P, D, R, C> ColumnDefinitionBuilder<N, P, NoConstraint, D, R, C>where N: NullabilityConstraint, P: PrimaryKeyConstraint, D: DefaultConstraint, R: ReferencesConstraint, C: CheckConstraint,

source

pub fn unique(self) -> ColumnDefinitionBuilder<N, P, IsUnique, D, R, C>

source§

impl<N, P, U, R, C> ColumnDefinitionBuilder<N, P, U, NoConstraint, R, C>where N: NullabilityConstraint, P: PrimaryKeyConstraint, U: UniqueConstraint, R: ReferencesConstraint, C: CheckConstraint,

source

pub fn default( self, expr: impl Into<Expression> ) -> ColumnDefinitionBuilder<N, P, U, HasDefault, R, C>

source§

impl<N, P, U, D, C> ColumnDefinitionBuilder<N, P, U, D, NoConstraint, C>where N: NullabilityConstraint, P: PrimaryKeyConstraint, U: UniqueConstraint, D: DefaultConstraint, C: CheckConstraint,

source

pub fn references( self, table_name: impl Into<TableName>, column: impl Into<Column> ) -> ColumnDefinitionBuilder<N, P, U, D, References, C>

source§

impl<N, P, U, D, R> ColumnDefinitionBuilder<N, P, U, D, R, NoConstraint>where N: NullabilityConstraint, P: PrimaryKeyConstraint, U: UniqueConstraint, D: DefaultConstraint, R: ReferencesConstraint,

source

pub fn check( self, cond: impl Into<Condition> ) -> ColumnDefinitionBuilder<N, P, U, D, R, Check>

Trait Implementations§

source§

impl<N, P, U, D, R, C> Debug for ColumnDefinitionBuilder<N, P, U, D, R, C>where N: NullabilityConstraint + Debug, P: PrimaryKeyConstraint + Debug, U: UniqueConstraint + Debug, D: DefaultConstraint + Debug, R: ReferencesConstraint + Debug, C: CheckConstraint + Debug,

source§

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

Formats the value using the given formatter. Read more
source§

impl<T, U> From<(T, U)> for ColumnDefinitionBuilderwhere T: Into<String>, U: Into<String>,

source§

fn from((name, type_): (T, U)) -> Self

Converts to this type from the input type.
source§

impl<N, P, U, D, R, C> From<ColumnDefinitionBuilder<N, P, U, D, R, C>> for ColumnDefinitionwhere N: NullabilityConstraint, P: PrimaryKeyConstraint, U: UniqueConstraint, D: DefaultConstraint, R: ReferencesConstraint, C: CheckConstraint,

source§

fn from(builder: ColumnDefinitionBuilder<N, P, U, D, R, C>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<N, P, U, D, R, C> RefUnwindSafe for ColumnDefinitionBuilder<N, P, U, D, R, C>where C: RefUnwindSafe, D: RefUnwindSafe, N: RefUnwindSafe, P: RefUnwindSafe, R: RefUnwindSafe, U: RefUnwindSafe,

§

impl<N, P, U, D, R, C> Send for ColumnDefinitionBuilder<N, P, U, D, R, C>where C: Send, D: Send, N: Send, P: Send, R: Send, U: Send,

§

impl<N, P, U, D, R, C> Sync for ColumnDefinitionBuilder<N, P, U, D, R, C>where C: Sync, D: Sync, N: Sync, P: Sync, R: Sync, U: Sync,

§

impl<N, P, U, D, R, C> Unpin for ColumnDefinitionBuilder<N, P, U, D, R, C>where C: Unpin, D: Unpin, N: Unpin, P: Unpin, R: Unpin, U: Unpin,

§

impl<N, P, U, D, R, C> UnwindSafe for ColumnDefinitionBuilder<N, P, U, D, R, C>where C: UnwindSafe, D: UnwindSafe, N: UnwindSafe, P: UnwindSafe, R: UnwindSafe, U: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.