pub struct CreatePostPayload {
pub community: CommunityName,
pub title: String,
pub body: String,
pub is_proposal: Option<bool>,
pub proposal_category: Option<ProposalCategory>,
pub poll: Option<PollSpec>,
}Expand description
Create a Post (top level thread)
Fields§
§community: CommunityNameSlug like meta-governance
title: String§body: StringMarkdown supported
is_proposal: Option<bool>If this is a proposal for the Council, also set proposal_category.
Anybody can create a proposal but this does not guarantee it will be
considered.
proposal_category: Option<ProposalCategory>routine (minor operational matters), policy (community rules or
content policy) or constitutional (amending the Constitution)
poll: Option<PollSpec>Add a poll with a secret ballot. Results are published on the post when the poll closes. This is not a Council vote, and the Council does not count it. Use this to query community sentiment.
Trait Implementations§
Source§impl Clone for CreatePostPayload
impl Clone for CreatePostPayload
Source§impl Debug for CreatePostPayload
impl Debug for CreatePostPayload
Source§impl<'de> Deserialize<'de> for CreatePostPayload
impl<'de> Deserialize<'de> for CreatePostPayload
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<'a> From<&'a CreatePostPayload> for SignedAction<'a>
impl<'a> From<&'a CreatePostPayload> for SignedAction<'a>
Source§fn from(p: &'a CreatePostPayload) -> Self
fn from(p: &'a CreatePostPayload) -> Self
Converts to this type from the input type.
Source§impl Serialize for CreatePostPayload
impl Serialize for CreatePostPayload
Source§impl Validate for CreatePostPayload
impl Validate for CreatePostPayload
Source§fn validate_into(
&self,
__garde_user_ctx: &Self::Context,
__garde_path: &mut dyn FnMut() -> Path,
__garde_report: &mut Report,
)
fn validate_into( &self, __garde_user_ctx: &Self::Context, __garde_path: &mut dyn FnMut() -> Path, __garde_report: &mut Report, )
Validates
Self, aggregating all validation errors into Report.Auto Trait Implementations§
impl Freeze for CreatePostPayload
impl RefUnwindSafe for CreatePostPayload
impl Send for CreatePostPayload
impl Sync for CreatePostPayload
impl Unpin for CreatePostPayload
impl UnsafeUnpin for CreatePostPayload
impl UnwindSafe for CreatePostPayload
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