Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
pub struct Problem {
    pub category: String,
    pub fid: i32,
    pub id: i32,
    pub level: i32,
    pub locked: bool,
    pub name: String,
    pub percent: f32,
    pub slug: String,
    pub starred: bool,
    pub status: String,
    pub desc: String,
}
Expand description

Problem model

Fields§

§category: String§fid: i32§id: i32§level: i32§locked: bool§name: String§percent: f32§slug: String§starred: bool§status: String§desc: String

Implementations§

source§

impl Problem

source

pub fn desc_comment(&self, conf: &Config) -> String

Trait Implementations§

source§

impl<'update> AsChangeset for &'update Problem

§

type Target = table

The table which Self::Changeset will be updating
§

type Changeset = <(Grouped<Eq<category, <&'update String as AsExpression<<category as Expression>::SqlType>>::Expression>>, Grouped<Eq<fid, <&'update i32 as AsExpression<<fid as Expression>::SqlType>>::Expression>>, Grouped<Eq<level, <&'update i32 as AsExpression<<level as Expression>::SqlType>>::Expression>>, Grouped<Eq<locked, <&'update bool as AsExpression<<locked as Expression>::SqlType>>::Expression>>, Grouped<Eq<name, <&'update String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Grouped<Eq<percent, <&'update f32 as AsExpression<<percent as Expression>::SqlType>>::Expression>>, Grouped<Eq<slug, <&'update String as AsExpression<<slug as Expression>::SqlType>>::Expression>>, Grouped<Eq<starred, <&'update bool as AsExpression<<starred as Expression>::SqlType>>::Expression>>, Grouped<Eq<status, <&'update String as AsExpression<<status as Expression>::SqlType>>::Expression>>, Grouped<Eq<desc, <&'update String as AsExpression<<desc as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset

The update statement this type represents
source§

fn as_changeset(self) -> Self::Changeset

Convert self into the actual update statement being executed
source§

impl AsChangeset for Problem

§

type Target = table

The table which Self::Changeset will be updating
§

type Changeset = <(Grouped<Eq<category, <String as AsExpression<<category as Expression>::SqlType>>::Expression>>, Grouped<Eq<fid, <i32 as AsExpression<<fid as Expression>::SqlType>>::Expression>>, Grouped<Eq<level, <i32 as AsExpression<<level as Expression>::SqlType>>::Expression>>, Grouped<Eq<locked, <bool as AsExpression<<locked as Expression>::SqlType>>::Expression>>, Grouped<Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Grouped<Eq<percent, <f32 as AsExpression<<percent as Expression>::SqlType>>::Expression>>, Grouped<Eq<slug, <String as AsExpression<<slug as Expression>::SqlType>>::Expression>>, Grouped<Eq<starred, <bool as AsExpression<<starred as Expression>::SqlType>>::Expression>>, Grouped<Eq<status, <String as AsExpression<<status as Expression>::SqlType>>::Expression>>, Grouped<Eq<desc, <String as AsExpression<<desc as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset

The update statement this type represents
source§

fn as_changeset(self) -> Self::Changeset

Convert self into the actual update statement being executed
source§

impl Clone for Problem

source§

fn clone(&self) -> Problem

Returns a copy 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 Problem

source§

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

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

impl Display for Problem

source§

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

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

impl HasTable for Problem

§

type Table = table

The table this type is associated with.
source§

fn table() -> Self::Table

Returns the table this type is associated with.
source§

impl<'ident> Identifiable for &'ident Problem

§

type Id = &'ident i32

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

fn id(self) -> Self::Id

Returns the identifier for this record. Read more
source§

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

§

type Values = <(Option<Grouped<Eq<category, <&'insert String as AsExpression<<category as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<fid, <&'insert i32 as AsExpression<<fid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<id, <&'insert i32 as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<level, <&'insert i32 as AsExpression<<level as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<locked, <&'insert bool as AsExpression<<locked as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<name, <&'insert String as AsExpression<<name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<percent, <&'insert f32 as AsExpression<<percent as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<slug, <&'insert String as AsExpression<<slug as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<starred, <&'insert bool as AsExpression<<starred as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<status, <&'insert String as AsExpression<<status as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<desc, <&'insert String as AsExpression<<desc as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
source§

fn values( self ) -> <(Option<Eq<category, &'insert String>>, Option<Eq<fid, &'insert i32>>, Option<Eq<id, &'insert i32>>, Option<Eq<level, &'insert i32>>, Option<Eq<locked, &'insert bool>>, Option<Eq<name, &'insert String>>, Option<Eq<percent, &'insert f32>>, Option<Eq<slug, &'insert String>>, Option<Eq<starred, &'insert bool>>, Option<Eq<status, &'insert String>>, Option<Eq<desc, &'insert String>>) as Insertable<table>>::Values

Construct Self::Values Read more
source§

fn insert_into( self, table: T ) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where T: Table, Self: Sized,

Insert self into a given table. Read more
source§

impl Insertable<table> for Problem

§

type Values = <(Option<Grouped<Eq<category, <String as AsExpression<<category as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<fid, <i32 as AsExpression<<fid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<id, <i32 as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<level, <i32 as AsExpression<<level as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<locked, <bool as AsExpression<<locked as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<percent, <f32 as AsExpression<<percent as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<slug, <String as AsExpression<<slug as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<starred, <bool as AsExpression<<starred as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<status, <String as AsExpression<<status as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<desc, <String as AsExpression<<desc as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
source§

fn values( self ) -> <(Option<Eq<category, String>>, Option<Eq<fid, i32>>, Option<Eq<id, i32>>, Option<Eq<level, i32>>, Option<Eq<locked, bool>>, Option<Eq<name, String>>, Option<Eq<percent, f32>>, Option<Eq<slug, String>>, Option<Eq<starred, bool>>, Option<Eq<status, String>>, Option<Eq<desc, String>>) as Insertable<table>>::Values

Construct Self::Values Read more
source§

fn insert_into( self, table: T ) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where T: Table, Self: Sized,

Insert self into a given table. Read more
source§

impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8, __ST9, __ST10> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8, __ST9, __ST10), __DB> for Problemwhere (String, i32, i32, i32, bool, String, f32, String, bool, String, String): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8, __ST9, __ST10), __DB>,

§

type Row = (String, i32, i32, i32, bool, String, f32, String, bool, String, String)

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

fn build(row: Self::Row) -> Result<Self>

Construct an instance of this type
source§

impl Serialize for Problem

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 UndecoratedInsertRecord<table> for Problem

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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 Twhere 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> IntoSql for T

source§

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 more
source§

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 more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere 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 Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

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