pub struct NewPost<'a> {
pub title: &'a str,
pub text: &'a str,
pub user_id: Uuid,
}Expand description
投稿作成用の構造体
Fields§
§title: &'a str§text: &'a str§user_id: UuidTrait Implementations§
Source§impl<'a, 'insert> Insertable<table> for &'insert NewPost<'a>
impl<'a, 'insert> Insertable<table> for &'insert NewPost<'a>
Source§type Values = <(Option<Grouped<Eq<title, <&'insert &'a str as AsExpression<<title as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<text, <&'insert &'a str as AsExpression<<text as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <&'insert Uuid as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<title, <&'insert &'a str as AsExpression<<title as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<text, <&'insert &'a str as AsExpression<<text as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <&'insert Uuid as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<title, &'insert &'a str>>, Option<Eq<text, &'insert &'a str>>, Option<Eq<user_id, &'insert Uuid>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<title, &'insert &'a str>>, Option<Eq<text, &'insert &'a str>>, Option<Eq<user_id, &'insert Uuid>>) as Insertable<table>>::Values
Construct
Self::Values Read more§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
Insert
self into a given table. Read moreSource§impl<'a> Insertable<table> for NewPost<'a>
impl<'a> Insertable<table> for NewPost<'a>
Source§type Values = <(Option<Grouped<Eq<title, <&'a str as AsExpression<<title as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<text, <&'a str as AsExpression<<text as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <Uuid as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<title, <&'a str as AsExpression<<title as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<text, <&'a str as AsExpression<<text as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_id, <Uuid as AsExpression<<user_id as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<title, &'a str>>, Option<Eq<text, &'a str>>, Option<Eq<user_id, Uuid>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<title, &'a str>>, Option<Eq<text, &'a str>>, Option<Eq<user_id, Uuid>>) as Insertable<table>>::Values
Construct
Self::Values Read more§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
Insert
self into a given table. Read moreimpl<'a> UndecoratedInsertRecord<table> for NewPost<'a>
Auto Trait Implementations§
impl<'a> Freeze for NewPost<'a>
impl<'a> RefUnwindSafe for NewPost<'a>
impl<'a> Send for NewPost<'a>
impl<'a> Sync for NewPost<'a>
impl<'a> Unpin for NewPost<'a>
impl<'a> UnwindSafe for NewPost<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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