pub struct UpdatePostParams {
pub post_id: i32,
pub title: Option<String>,
pub content_md: Option<String>,
pub summary: Option<String>,
pub slug: Option<String>,
pub tags: Option<Vec<String>>,
pub status: Option<String>,
pub cover_image: Option<String>,
}Fields§
§post_id: i32要更新的文章 id。
title: Option<String>新标题。未提供则不修改(且不联动 slug)。
content_md: Option<String>新 Markdown 正文。未提供则不重新渲染(content_html/toc/度量保持不变)。
summary: Option<String>新摘要。content_md 变化且未提供时自动从正文提取;content_md 未变且未提供则保留旧值。
slug: Option<String>新 slug。未提供则不修改;提供则校验格式并自动去重。
新标签列表。未提供则不修改;提供空列表则清空标签(完全替换旧标签)。
status: Option<String>新状态:draft / published。未提供则不修改。
cover_image: Option<String>新封面图 URL。未提供则不修改;空字符串清空封面。
Trait Implementations§
Source§impl Debug for UpdatePostParams
impl Debug for UpdatePostParams
Source§impl<'de> Deserialize<'de> for UpdatePostParams
impl<'de> Deserialize<'de> for UpdatePostParams
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 JsonSchema for UpdatePostParams
impl JsonSchema for UpdatePostParams
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for UpdatePostParams
impl RefUnwindSafe for UpdatePostParams
impl Send for UpdatePostParams
impl Sync for UpdatePostParams
impl Unpin for UpdatePostParams
impl UnsafeUnpin for UpdatePostParams
impl UnwindSafe for UpdatePostParams
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
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.