pub struct Question {
Show 20 fields pub qs_slug: Option<String>, pub content: Option<String>, pub stats: Stats, pub sample_test_case: String, pub example_testcases: String, pub meta_data: MetaData, pub translated_title: Option<String>, pub translated_content: Option<String>, pub hints: Vec<String>, pub mysql_schemas: Vec<String>, pub data_schemas: Vec<String>, pub question_id: String, pub question_title: Option<String>, pub is_paid_only: bool, pub code_snippets: Option<Vec<CodeSnippet>>, pub title: String, pub difficulty: String, pub topic_tags: Vec<TopicTags>, pub enable_run_code: bool, pub env_info: EnvInfo,
}
Expand description

a question’s detail

Fields§

§qs_slug: Option<String>§content: Option<String>§stats: Stats§sample_test_case: String§example_testcases: String§meta_data: MetaData§translated_title: Option<String>§translated_content: Option<String>§hints: Vec<String>§mysql_schemas: Vec<String>§data_schemas: Vec<String>§question_id: String§question_title: Option<String>§is_paid_only: bool§code_snippets: Option<Vec<CodeSnippet>>§title: String§difficulty: String§topic_tags: Vec<TopicTags>§enable_run_code: bool§env_info: EnvInfo

Trait Implementations§

source§

impl Clone for Question

source§

fn clone(&self) -> Question

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 Question

source§

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

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

impl Default for Question

source§

fn default() -> Question

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

impl<'de> Deserialize<'de> for Question

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 Display for Question

source§

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

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

impl InsertToDB for Question

§

type Value = u32

§

type Entity = Entity

§

type Model = Model

§

type ActiveModel = ActiveModel

source§

fn to_model(&self, question_id: Self::Value) -> Self::Model

source§

fn on_conflict() -> OnConflict

source§

fn insert_to_db( &mut self, _info: Self::Value ) -> impl Future<Output = ()> + Send

Insert with extra logic Read more
source§

fn to_activemodel(&self, value: Self::Value) -> Self::ActiveModel

source§

fn insert_one(&self, info: Self::Value) -> impl Future<Output = ()> + Send

Insert One Read more
source§

fn insert_many(value: Vec<Self::ActiveModel>) -> impl Future<Output = ()> + Send

source§

impl PartialEq for Question

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Render for Question

source§

fn to_md_str(&self, with_env: bool) -> String

uniform treatment Question detail to markdown String Read more
source§

fn to_tui_vec(&self) -> Vec<Line<'_>>

for ratatui paragraph
source§

fn render_to_terminal(&self)

render to terminal
source§

fn to_rendered_str(&self, with_env: bool, col: u16, row: u16) -> String

Get a rendered markdown String Read more
source§

impl Serialize for Question

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 Question

source§

impl StructuralPartialEq for Question

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
§

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

§

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

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

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

§

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

§

impl<T> NoneValue for T
where T: Default,

§

type NoneType = T

§

fn null_value() -> T

The none-equivalent value.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> ToCompactString for T
where T: Display,

§

fn to_compact_string(&self) -> CompactString

Converts the given value to a [CompactString]. Read more
source§

impl<T> ToOwned for T
where 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 T
where 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 T
where 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 T
where 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 T
where 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
source§

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