pub struct Book {
pub id: i32,
pub title: String,
}
Fields§
§id: i32
§title: String
Trait Implementations§
source§impl<__FK> BelongsTo<&Book> for BookAuthorwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Book: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<&Book> for BookAuthorwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Book: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = book_id
type ForeignKeyColumn = book_id
The database column representing the foreign key
of the table this struct represents
source§fn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
source§impl<__FK> BelongsTo<&Book> for Pagewhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Book: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<&Book> for Pagewhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Book: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = book_id
type ForeignKeyColumn = book_id
The database column representing the foreign key
of the table this struct represents
source§fn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
source§impl<__FK> BelongsTo<Book> for BookAuthorwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Book: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Book> for BookAuthorwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Book: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = book_id
type ForeignKeyColumn = book_id
The database column representing the foreign key
of the table this struct represents
source§fn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
source§impl<__FK> BelongsTo<Book> for Pagewhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Book: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Book> for Pagewhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Book: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = book_id
type ForeignKeyColumn = book_id
The database column representing the foreign key
of the table this struct represents
source§fn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
source§impl<'ident> Identifiable for &'ident Book
impl<'ident> Identifiable for &'ident Book
source§impl PartialEq for Book
impl PartialEq for Book
source§impl<__DB: Backend> Selectable<__DB> for Book
impl<__DB: Backend> Selectable<__DB> for Book
§type SelectExpression = (id, title)
type SelectExpression = (id, title)
The expression you’d like to select. Read more
source§fn construct_selection() -> Self::SelectExpression
fn construct_selection() -> Self::SelectExpression
Construct an instance of the expression
impl StructuralPartialEq for Book
Auto Trait Implementations§
impl Freeze for Book
impl RefUnwindSafe for Book
impl Send for Book
impl Sync for Book
impl Unpin for Book
impl UnwindSafe for Book
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
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read moresource§impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
source§fn as_select() -> SelectBy<T, DB>
fn as_select() -> SelectBy<T, DB>
Construct a select clause based on a
Selectable
implementation. Read moresource§fn as_returning() -> SelectBy<Self, DB>
fn as_returning() -> SelectBy<Self, DB>
An alias for
as_select
that can be used with returning clausessource§impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
source§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.