Struct NewItem

Source
pub struct NewItem {
Show 17 fields pub calendar: i32, pub year: Option<i32>, pub season: Option<i32>, pub month: Option<i32>, pub day: i32, pub kind: i32, pub fixed_date: bool, pub all_day: bool, pub title: Option<String>, pub note: Option<String>, pub datetime: Option<String>, pub duration: Option<i32>, pub status: Option<i32>, pub order_in_week: Option<String>, pub order_in_resolution: Option<String>, pub sync: Option<i32>, pub uuid: Option<String>,
}

Fields§

§calendar: i32§year: Option<i32>§season: Option<i32>§month: Option<i32>§day: i32§kind: i32§fixed_date: bool§all_day: bool§title: Option<String>§note: Option<String>§datetime: Option<String>§duration: Option<i32>§status: Option<i32>§order_in_week: Option<String>§order_in_resolution: Option<String>§sync: Option<i32>§uuid: Option<String>

Implementations§

Source§

impl NewItem

Source

pub fn new( calendar: i32, year: Option<i32>, season: Option<i32>, month: Option<i32>, day: i32, kind: i32, text: String, ordering_key: String, ) -> Self

Source

pub fn from(item: &Item) -> NewItem

Trait Implementations§

Source§

impl<'insert> Insertable<table> for &'insert NewItem

Source§

type Values = <(Option<Grouped<Eq<calendar, <&'insert i32 as AsExpression<<calendar as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<year, <&'insert i32 as AsExpression<<year as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<season, <&'insert i32 as AsExpression<<season as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<month, <&'insert i32 as AsExpression<<month as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<day, <&'insert i32 as AsExpression<<day as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<kind, <&'insert i32 as AsExpression<<kind as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<fixed_date, <&'insert bool as AsExpression<<fixed_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<all_day, <&'insert bool as AsExpression<<all_day as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<title, <&'insert String as AsExpression<<title as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<note, <&'insert String as AsExpression<<note as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<datetime, <&'insert String as AsExpression<<datetime as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<duration, <&'insert i32 as AsExpression<<duration as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<status, <&'insert i32 as AsExpression<<status as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<order_in_week, <&'insert String as AsExpression<<order_in_week as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<order_in_resolution, <&'insert String as AsExpression<<order_in_resolution as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<sync, <&'insert i32 as AsExpression<<sync as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<uuid, <&'insert String as AsExpression<<uuid as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
Source§

fn values( self, ) -> <(Option<Eq<calendar, &'insert i32>>, Option<Eq<year, &'insert i32>>, Option<Eq<season, &'insert i32>>, Option<Eq<month, &'insert i32>>, Option<Eq<day, &'insert i32>>, Option<Eq<kind, &'insert i32>>, Option<Eq<fixed_date, &'insert bool>>, Option<Eq<all_day, &'insert bool>>, Option<Eq<title, &'insert String>>, Option<Eq<note, &'insert String>>, Option<Eq<datetime, &'insert String>>, Option<Eq<duration, &'insert i32>>, Option<Eq<status, &'insert i32>>, Option<Eq<order_in_week, &'insert String>>, Option<Eq<order_in_resolution, &'insert String>>, Option<Eq<sync, &'insert i32>>, Option<Eq<uuid, &'insert String>>) as Insertable<table>>::Values

Construct Self::Values Read more
Source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where T: Table, Self: Sized,

Insert self into a given table. Read more
Source§

impl Insertable<table> for NewItem

Source§

type Values = <(Option<Grouped<Eq<calendar, <i32 as AsExpression<<calendar as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<year, <i32 as AsExpression<<year as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<season, <i32 as AsExpression<<season as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<month, <i32 as AsExpression<<month as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<day, <i32 as AsExpression<<day as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<kind, <i32 as AsExpression<<kind as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<fixed_date, <bool as AsExpression<<fixed_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<all_day, <bool as AsExpression<<all_day as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<title, <String as AsExpression<<title as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<note, <String as AsExpression<<note as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<datetime, <String as AsExpression<<datetime as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<duration, <i32 as AsExpression<<duration as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<status, <i32 as AsExpression<<status as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<order_in_week, <String as AsExpression<<order_in_week as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<order_in_resolution, <String as AsExpression<<order_in_resolution as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<sync, <i32 as AsExpression<<sync as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<uuid, <String as AsExpression<<uuid as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
Source§

fn values( self, ) -> <(Option<Eq<calendar, i32>>, Option<Eq<year, i32>>, Option<Eq<season, i32>>, Option<Eq<month, i32>>, Option<Eq<day, i32>>, Option<Eq<kind, i32>>, Option<Eq<fixed_date, bool>>, Option<Eq<all_day, bool>>, Option<Eq<title, String>>, Option<Eq<note, String>>, Option<Eq<datetime, String>>, Option<Eq<duration, i32>>, Option<Eq<status, i32>>, Option<Eq<order_in_week, String>>, Option<Eq<order_in_resolution, String>>, Option<Eq<sync, i32>>, Option<Eq<uuid, String>>) as Insertable<table>>::Values

Construct Self::Values Read more
Source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where T: Table, Self: Sized,

Insert self into a given table. Read more
Source§

impl UndecoratedInsertRecord<table> for NewItem

Auto Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoSql for T

Source§

fn into_sql<T>(self) -> Self::Expression

Convert self to an expression for Diesel’s query builder. Read more
Source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T