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
§enable_run_code: bool
§env_info: EnvInfo
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Question
impl<'de> Deserialize<'de> for Question
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 InsertToDB for Question
impl InsertToDB for Question
type Value = u32
type Entity = Entity
type Model = Model
type ActiveModel = ActiveModel
fn to_model(&self, question_id: Self::Value) -> Self::Model
fn on_conflict() -> OnConflict
source§fn insert_to_db(
&mut self,
_info: Self::Value,
) -> impl Future<Output = ()> + Send
fn insert_to_db( &mut self, _info: Self::Value, ) -> impl Future<Output = ()> + Send
Insert with extra logic Read more
fn to_activemodel(&self, value: Self::Value) -> Self::ActiveModel
source§fn insert_one(&self, info: Self::Value) -> impl Future<Output = ()> + Send
fn insert_one(&self, info: Self::Value) -> impl Future<Output = ()> + Send
Insert One Read more
fn insert_many(value: Vec<Self::ActiveModel>) -> impl Future<Output = ()> + Send
impl Eq for Question
impl StructuralPartialEq for Question
Auto Trait Implementations§
impl Freeze for Question
impl RefUnwindSafe for Question
impl Send for Question
impl Sync for Question
impl Unpin for Question
impl UnwindSafe for Question
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
source§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moresource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more