pub struct CreatePageDraftRequest {
pub draft_id: String,
pub title: String,
pub content: String,
pub space: Option<String>,
/* private fields */
}Expand description
First durable snapshot for a human-authored Page draft.
The client only sends this request once either title or content is
meaningful. Both fields default to empty so title-first and body-first
writing flows share one wire shape.
Fields§
§draft_id: StringStable client-generated id used to make an ambiguous create retry safe.
title: String§content: String§space: Option<String>Implementations§
Source§impl CreatePageDraftRequest
impl CreatePageDraftRequest
Sourcepub fn new(
draft_id: String,
title: String,
content: String,
space: Option<String>,
) -> Self
pub fn new( draft_id: String, title: String, content: String, space: Option<String>, ) -> Self
Build a request with an explicit space value.
Passing None serializes as "space": null.
Sourcepub fn new_inheriting_header_space(
draft_id: String,
title: String,
content: String,
) -> Self
pub fn new_inheriting_header_space( draft_id: String, title: String, content: String, ) -> Self
Build a request that omits space, allowing the server to inherit the
X-Wenlan-Space request header.
Sourcepub fn space_was_provided(&self) -> bool
pub fn space_was_provided(&self) -> bool
Whether the JSON body contained a space key.
This distinguishes an omitted key (inherit the request header) from an
explicit null (clear the header-provided Space).
Trait Implementations§
Source§impl Clone for CreatePageDraftRequest
impl Clone for CreatePageDraftRequest
Source§fn clone(&self) -> CreatePageDraftRequest
fn clone(&self) -> CreatePageDraftRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreatePageDraftRequest
impl Debug for CreatePageDraftRequest
Source§impl<'de> Deserialize<'de> for CreatePageDraftRequest
impl<'de> Deserialize<'de> for CreatePageDraftRequest
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
impl Eq for CreatePageDraftRequest
Source§impl PartialEq for CreatePageDraftRequest
impl PartialEq for CreatePageDraftRequest
Source§impl Serialize for CreatePageDraftRequest
impl Serialize for CreatePageDraftRequest
impl StructuralPartialEq for CreatePageDraftRequest
Auto Trait Implementations§
impl Freeze for CreatePageDraftRequest
impl RefUnwindSafe for CreatePageDraftRequest
impl Send for CreatePageDraftRequest
impl Sync for CreatePageDraftRequest
impl Unpin for CreatePageDraftRequest
impl UnsafeUnpin for CreatePageDraftRequest
impl UnwindSafe for CreatePageDraftRequest
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