pub struct NewIndex {
pub title_slug: String,
pub title: String,
pub title_cn: Option<String>,
pub is_favor: bool,
pub frontend_question_id: String,
pub paid_only: bool,
pub difficulty: String,
pub status: Option<String>,
pub ac_rate: f64,
pub topic_tags: Option<Vec<Model>>,
}
Fields§
§title_slug: String
§title: String
§title_cn: Option<String>
§is_favor: bool
§frontend_question_id: String
§paid_only: bool
§difficulty: String
§status: Option<String>
§ac_rate: f64
Trait Implementations§
source§impl<'de> Deserialize<'de> for NewIndex
impl<'de> Deserialize<'de> for NewIndex
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 NewIndex
impl InsertToDB for NewIndex
type Value = u32
type Entity = Entity
type Model = Model
type ActiveModel = ActiveModel
fn to_model(&self, _v: Self::Value) -> Self::Model
source§async fn insert_to_db(&mut self, v: Self::Value)
async fn insert_to_db(&mut self, v: Self::Value)
Insert with extra logic Read more
fn on_conflict() -> OnConflict
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 StructuralPartialEq for NewIndex
Auto Trait Implementations§
impl Freeze for NewIndex
impl RefUnwindSafe for NewIndex
impl Send for NewIndex
impl Sync for NewIndex
impl Unpin for NewIndex
impl UnwindSafe for NewIndex
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.