Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Struct Problem

Source
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

Source§

type Target = table

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

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

Source§

type Target = table

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

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

Source§

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

Source§

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

Source§

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>
where T: Table, Self: Sized,

Insert self into a given table. Read more
Source§

impl Insertable<table> for Problem

Source§

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>
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 Problem

Source§

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

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T