GameGenre

Struct GameGenre 

Source
pub struct GameGenre {
    pub id: i32,
    pub slug: String,
    pub name: String,
    pub created_at: Option<Timestamp>,
    pub updated_at: Option<Timestamp>,
}

Fields§

§id: i32§slug: String§name: String§created_at: Option<Timestamp>§updated_at: Option<Timestamp>

Trait Implementations§

Source§

impl<'update> AsChangeset for &'update GameGenre

Source§

type Target = table

The table which Self::Changeset will be updating
Source§

type Changeset = <(Grouped<Eq<slug, <&'update String as AsExpression<<slug as Expression>::SqlType>>::Expression>>, Grouped<Eq<name, <&'update String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Grouped<Eq<created_at, <&'update Timestamp as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<updated_at, <&'update Timestamp as AsExpression<<updated_at as Expression>::SqlType>>::Expression>>>) as AsChangeset>::Changeset

The update statement this type represents
Source§

fn as_changeset(self) -> <Self as AsChangeset>::Changeset

Convert self into the actual update statement being executed
Source§

impl AsChangeset for GameGenre

Source§

type Target = table

The table which Self::Changeset will be updating
Source§

type Changeset = <(Grouped<Eq<slug, <String as AsExpression<<slug as Expression>::SqlType>>::Expression>>, Grouped<Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Grouped<Eq<created_at, <Timestamp as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<updated_at, <Timestamp as AsExpression<<updated_at as Expression>::SqlType>>::Expression>>>) as AsChangeset>::Changeset

The update statement this type represents
Source§

fn as_changeset(self) -> <Self as AsChangeset>::Changeset

Convert self into the actual update statement being executed
Source§

impl<__FK> BelongsTo<&GameGenre> for GameGenreMap
where __FK: Hash + Eq, for<'__a> &'__a i32: Into<Option<&'__a __FK>>, for<'__a> &'__a GameGenre: Identifiable<Id = &'__a __FK>,

Source§

type ForeignKey = __FK

The foreign key of this struct
Source§

type ForeignKeyColumn = genre_id

The database column representing the foreign key of the table this struct represents
Source§

fn foreign_key(&self) -> Option<&Self::ForeignKey>

Returns the foreign key for self
Source§

fn foreign_key_column() -> Self::ForeignKeyColumn

Returns the foreign key column of this struct’s table
Source§

impl<__FK> BelongsTo<GameGenre> for GameGenreMap
where __FK: Hash + Eq, for<'__a> &'__a i32: Into<Option<&'__a __FK>>, for<'__a> &'__a GameGenre: Identifiable<Id = &'__a __FK>,

Source§

type ForeignKey = __FK

The foreign key of this struct
Source§

type ForeignKeyColumn = genre_id

The database column representing the foreign key of the table this struct represents
Source§

fn foreign_key(&self) -> Option<&Self::ForeignKey>

Returns the foreign key for self
Source§

fn foreign_key_column() -> Self::ForeignKeyColumn

Returns the foreign key column of this struct’s table
Source§

impl Clone for GameGenre

Source§

fn clone(&self) -> GameGenre

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GameGenre

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GameGenre

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GameGenre

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl HasTable for GameGenre

Source§

type Table = table

The table this type is associated with.
Source§

fn table() -> <Self as HasTable>::Table

Returns the table this type is associated with.
Source§

impl Hash for GameGenre

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'ident> Identifiable for &'ident GameGenre

Source§

type Id = &'ident i32

The type of this struct’s identifier. Read more
Source§

fn id(self) -> <Self as Identifiable>::Id

Returns the identifier for this record. Read more
Source§

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

Source§

type Values = <(Option<Grouped<Eq<id, <&'insert i32 as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<slug, <&'insert String as AsExpression<<slug as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<name, <&'insert String as AsExpression<<name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <&'insert Timestamp as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<updated_at, <&'insert Timestamp as AsExpression<<updated_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
Source§

fn values( self, ) -> <(Option<Eq<id, &'insert i32>>, Option<Eq<slug, &'insert String>>, Option<Eq<name, &'insert String>>, Option<Eq<created_at, &'insert Timestamp>>, Option<Eq<updated_at, &'insert Timestamp>>) 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 GameGenre

Source§

type Values = <(Option<Grouped<Eq<id, <i32 as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<slug, <String as AsExpression<<slug as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <Timestamp as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<updated_at, <Timestamp as AsExpression<<updated_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
Source§

fn values( self, ) -> <(Option<Eq<id, i32>>, Option<Eq<slug, String>>, Option<Eq<name, String>>, Option<Eq<created_at, Timestamp>>, Option<Eq<updated_at, Timestamp>>) 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 Message for GameGenre

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for GameGenre

Source§

fn eq(&self, other: &GameGenre) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4), __DB> for GameGenre

Source§

type Row = (i32, String, String, Option<Timestamp>, Option<Timestamp>)

The Rust type you’d like to map from. Read more
Source§

fn build( row: (i32, String, String, Option<Timestamp>, Option<Timestamp>), ) -> Result<Self>

Construct an instance of this type
Source§

impl<__DB: Backend> Selectable<__DB> for GameGenre

Source§

type SelectExpression = (id, slug, name, created_at, updated_at)

The expression you’d like to select. Read more
Source§

fn construct_selection() -> Self::SelectExpression

Construct an instance of the expression
Source§

impl Serialize for GameGenre

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for GameGenre

Source§

impl StructuralPartialEq for GameGenre

Source§

impl UndecoratedInsertRecord<table> for GameGenre

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
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, Conn> RunQueryDsl<Conn> for T

Source§

fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
where Conn: AsyncConnection + Send, Self: ExecuteDsl<Conn> + 'query,

Executes the given command, returning the number of rows affected. Read more
Source§

fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
where U: Send, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,

Executes the given query, returning a Vec with the returned rows. Read more
Source§

fn load_stream<'conn, 'query, U>( self, conn: &'conn mut Conn, ) -> Self::LoadFuture<'conn>
where Conn: AsyncConnection, U: 'conn, Self: LoadQuery<'query, Conn, U> + 'query,

Executes the given query, returning a Stream with the returned rows. Read more
Source§

fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
where U: Send + 'conn, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,

Runs the command, and returns the affected row. Read more
Source§

fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
where U: Send, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,

Runs the command, returning an Vec with the affected rows. Read more
Source§

fn first<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
where U: Send + 'conn, Conn: AsyncConnection, Self: LimitDsl, Self::Output: LoadQuery<'query, Conn, U> + Send + 'query,

Attempts to load a single record. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, DB> SelectableHelper<DB> for T
where T: Selectable<DB>, DB: Backend,

Source§

fn as_select() -> SelectBy<T, DB>

Construct a select clause based on a Selectable implementation. Read more
Source§

fn as_returning() -> SelectBy<Self, DB>

An alias for as_select that can be used with returning clauses
Source§

impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
where ST: SqlTypeOrSelectable + TupleSize, T: Queryable<ST, DB>, DB: Backend,

Source§

const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE

The number of fields that this type will consume.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,