Struct news_flash::models::category::CategoryMapping
source · pub struct CategoryMapping {
pub parent_id: CategoryID,
pub category_id: CategoryID,
pub sort_index: Option<i32>,
}
Fields
parent_id: CategoryID
category_id: CategoryID
sort_index: Option<i32>
Trait Implementations
sourceimpl<__FK> BelongsTo<&Category> for CategoryMappingwhere
__FK: Hash + Eq,
for<'__a> &'__a CategoryID: Into<Option<&'__a __FK>>,
for<'__a> &'__a Category: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<&Category> for CategoryMappingwhere
__FK: Hash + Eq,
for<'__a> &'__a CategoryID: Into<Option<&'__a __FK>>,
for<'__a> &'__a Category: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = category_id
type ForeignKeyColumn = category_id
The database column representing the foreign key
of the table this struct represents Read more
sourcefn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
sourcefn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
sourceimpl<__FK> BelongsTo<Category> for CategoryMappingwhere
__FK: Hash + Eq,
for<'__a> &'__a CategoryID: Into<Option<&'__a __FK>>,
for<'__a> &'__a Category: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Category> for CategoryMappingwhere
__FK: Hash + Eq,
for<'__a> &'__a CategoryID: Into<Option<&'__a __FK>>,
for<'__a> &'__a Category: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = category_id
type ForeignKeyColumn = category_id
The database column representing the foreign key
of the table this struct represents Read more
sourcefn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
sourcefn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
sourceimpl Clone for CategoryMapping
impl Clone for CategoryMapping
sourcefn clone(&self) -> CategoryMapping
fn clone(&self) -> CategoryMapping
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CategoryMapping
impl Debug for CategoryMapping
sourceimpl HasTable for CategoryMapping
impl HasTable for CategoryMapping
sourceimpl<'ident> Identifiable for &'ident CategoryMapping
impl<'ident> Identifiable for &'ident CategoryMapping
sourceimpl PartialEq<CategoryMapping> for CategoryMapping
impl PartialEq<CategoryMapping> for CategoryMapping
sourcefn eq(&self, other: &CategoryMapping) -> bool
fn eq(&self, other: &CategoryMapping) -> bool
sourceimpl<__DB: Backend, __ST0, __ST1, __ST2> Queryable<(__ST0, __ST1, __ST2), __DB> for CategoryMappingwhere
(CategoryID, CategoryID, Option<i32>): FromStaticSqlRow<(__ST0, __ST1, __ST2), __DB>,
impl<__DB: Backend, __ST0, __ST1, __ST2> Queryable<(__ST0, __ST1, __ST2), __DB> for CategoryMappingwhere
(CategoryID, CategoryID, Option<i32>): FromStaticSqlRow<(__ST0, __ST1, __ST2), __DB>,
type Row = (CategoryID, CategoryID, Option<i32>)
type Row = (CategoryID, CategoryID, Option<i32>)
The Rust type you’d like to map from. Read more
impl Eq for CategoryMapping
impl StructuralEq for CategoryMapping
impl StructuralPartialEq for CategoryMapping
Auto Trait Implementations
impl RefUnwindSafe for CategoryMapping
impl Send for CategoryMapping
impl Sync for CategoryMapping
impl Unpin for CategoryMapping
impl UnwindSafe for CategoryMapping
Blanket Implementations
sourceimpl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent, Global>> for Childwhere
Child: BelongingToDsl<&'a [Parent]>,
impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent, Global>> for Childwhere
Child: BelongingToDsl<&'a [Parent]>,
type Output = <Child as BelongingToDsl<&'a [Parent]>>::Output
type Output = <Child as BelongingToDsl<&'a [Parent]>>::Output
The query returned by
belonging_to
sourcefn belonging_to(
parents: &'a Vec<Parent, Global>
) -> <Child as BelongingToDsl<&'a Vec<Parent, Global>>>::Output
fn belonging_to(
parents: &'a Vec<Parent, Global>
) -> <Child as BelongingToDsl<&'a Vec<Parent, Global>>>::Output
Get the record(s) belonging to record(s)
other
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
Convert
self
to an expression for Diesel’s query builder. Read moresourcefn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
Convert
&self
to an expression for Diesel’s query builder. Read moreimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
sourceconst 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.