pub struct Author {
pub id: i32,
pub name: String,
}
Fields§
§id: i32
§name: String
Trait Implementations§
source§impl<__FK> BelongsTo<&Author> for BookAuthorwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Author: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<&Author> for BookAuthorwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Author: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = author_id
type ForeignKeyColumn = author_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<Author> for BookAuthorwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Author: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Author> for BookAuthorwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Author: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = author_id
type ForeignKeyColumn = author_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 Author
impl<'ident> Identifiable for &'ident Author
source§impl PartialEq for Author
impl PartialEq for Author
source§impl<__DB: Backend> Selectable<__DB> for Author
impl<__DB: Backend> Selectable<__DB> for Author
§type SelectExpression = (id, name)
type SelectExpression = (id, name)
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 Author
Auto Trait Implementations§
impl Freeze for Author
impl RefUnwindSafe for Author
impl Send for Author
impl Sync for Author
impl Unpin for Author
impl UnwindSafe for Author
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.