pub struct PostsMsg {}Expand description
Represents the messages to interact with the posts module.
Implementations§
Source§impl PostsMsg
impl PostsMsg
Sourcepub fn create_post(
subspace_id: u64,
section_id: u32,
external_id: Option<&str>,
text: &str,
entities: Option<Entities>,
tags: Vec<&str>,
attachments: Vec<AttachmentContent>,
author: Addr,
conversation_id: Option<u64>,
reply_settings: ReplySetting,
referenced_posts: Vec<PostReference>,
) -> MsgCreatePost
pub fn create_post( subspace_id: u64, section_id: u32, external_id: Option<&str>, text: &str, entities: Option<Entities>, tags: Vec<&str>, attachments: Vec<AttachmentContent>, author: Addr, conversation_id: Option<u64>, reply_settings: ReplySetting, referenced_posts: Vec<PostReference>, ) -> MsgCreatePost
Creates an instance of MsgCreatePost.
subspace_id- Id of the subspace inside which the post must be created.section_id- Id of the section inside which the post must be created.external_id- External id for this post.text- Text of the post.entities- Entities connected to this post.tags- Tags related to this post.attachments- Attachments of the post.author- Author of the post.conversation_id- Id of the original post of the conversation.reply_settings- Reply settings of this post.reference_posts- A list this posts references (either as a reply, repost or quote).
Sourcepub fn edit_post(
subspace_id: u64,
post_id: u64,
text: Option<&str>,
entities: Option<Entities>,
tags: Vec<&str>,
editor: Addr,
) -> MsgEditPost
pub fn edit_post( subspace_id: u64, post_id: u64, text: Option<&str>, entities: Option<Entities>, tags: Vec<&str>, editor: Addr, ) -> MsgEditPost
Creates an instance of MsgEditPost.
subspace_id- Id of the subspace inside which the post is.post_id- Id of the post to edit.text- New text of the post. It will not change the current post’s text if set this field toNone.entities- New entities connected to this post. These will always replace the current post’s entities.editor- Editor of the post.
Sourcepub fn delete_post(
subspace_id: u64,
post_id: u64,
signer: Addr,
) -> MsgDeletePost
pub fn delete_post( subspace_id: u64, post_id: u64, signer: Addr, ) -> MsgDeletePost
Creates an instance of MsgDeletePost.
subspace_id- Id of the subspace containing the post.post_id- Id of the post to be deleted.signer- User that is deleting the post.
Sourcepub fn add_post_attachment(
subspace_id: u64,
post_id: u64,
content: AttachmentContent,
editor: Addr,
) -> MsgAddPostAttachment
pub fn add_post_attachment( subspace_id: u64, post_id: u64, content: AttachmentContent, editor: Addr, ) -> MsgAddPostAttachment
Creates an instance of MsgAddPostAttachment.
subspace_id- Id of the subspace containing the post.post_id- Id of the post from which to remove the attachment.attachment_id- Id of the attachment to be removed.editor- User that is removing the attachment.
Sourcepub fn remove_post_attachment(
subspace_id: u64,
post_id: u64,
attachment_id: u32,
editor: Addr,
) -> MsgRemovePostAttachment
pub fn remove_post_attachment( subspace_id: u64, post_id: u64, attachment_id: u32, editor: Addr, ) -> MsgRemovePostAttachment
Creates an instance of MsgRemovePostAttachment.
subspace_id- Id of the subspace containing the post.post_id- Id of the post from which to remove the attachment.attachment_id- Id of the attachment to be removed.editor- User that is removing the attachment.
Sourcepub fn answer_poll(
subspace_id: u64,
post_id: u64,
poll_id: u32,
answers_indexes: Vec<u32>,
signer: Addr,
) -> MsgAnswerPoll
pub fn answer_poll( subspace_id: u64, post_id: u64, poll_id: u32, answers_indexes: Vec<u32>, signer: Addr, ) -> MsgAnswerPoll
Creates an instance of MsgAnswerPoll.
subspace_id- Id of the subspace containing the post.post_id- Id of the post that contains the poll to be answered.poll_id- Id of the poll to be answered.answers_indexes- Indexes of the answer inside the ProvidedAnswers array.signer- Address of the user answering the poll.
Sourcepub fn move_post(
subspace_id: u64,
post_id: u64,
target_subspace_id: u64,
target_section_id: u32,
owner: Addr,
) -> MsgMovePost
pub fn move_post( subspace_id: u64, post_id: u64, target_subspace_id: u64, target_section_id: u32, owner: Addr, ) -> MsgMovePost
Creates an instance of MsgMovePost.
subspace_id- Id of the subspace where the post is currently located.post_id- Id of the post to be moved.target_subspace_id- Id of the target subspace to which the post will be moved.target_section_id- Id of the target section to which the post will be moved.owner- Address of the post owner.
Sourcepub fn request_post_owner_transfer(
subspace_id: u64,
post_id: u64,
receiver: Addr,
sender: Addr,
) -> MsgRequestPostOwnerTransfer
pub fn request_post_owner_transfer( subspace_id: u64, post_id: u64, receiver: Addr, sender: Addr, ) -> MsgRequestPostOwnerTransfer
Creates an instance of MsgRequestPostOwnerTransfer.
subspace_id- Id of the subspace that holds the post which ownership should be transferred.post_id- Id of the post which will be transferred.receiver- Address of the post ownership receiver.sender- Address of the sender who is creating a transfer request.
Sourcepub fn cancel_post_owner_transfer_request(
subspace_id: u64,
post_id: u64,
sender: Addr,
) -> MsgCancelPostOwnerTransferRequest
pub fn cancel_post_owner_transfer_request( subspace_id: u64, post_id: u64, sender: Addr, ) -> MsgCancelPostOwnerTransferRequest
Creates an instance of MsgCancelPostOwnerTransferRequest.
subspace_id- Id of the subspace that holds the post for which the request should be canceled.post_id- Id of the post for which the request will be cancelled.sender- Address of the transfer request sender.
Sourcepub fn accept_post_owner_transfer_request(
subspace_id: u64,
post_id: u64,
receiver: Addr,
) -> MsgAcceptPostOwnerTransferRequest
pub fn accept_post_owner_transfer_request( subspace_id: u64, post_id: u64, receiver: Addr, ) -> MsgAcceptPostOwnerTransferRequest
Creates an instance of MsgAcceptPostOwnerTransferRequest.
subspace_id- Id of the subspace holding the post for which the request will be accepted.post_id- Id of the post for which the request will be accepted.receiver- Address of the request receiver.
Sourcepub fn refuse_post_owner_transfer_request(
subspace_id: u64,
post_id: u64,
receiver: Addr,
) -> MsgRefusePostOwnerTransferRequest
pub fn refuse_post_owner_transfer_request( subspace_id: u64, post_id: u64, receiver: Addr, ) -> MsgRefusePostOwnerTransferRequest
Creates an instance of MsgRefusePostOwnerTransferRequest.
subspace_id- Id of the subspace holding the post for which the request will be refused.post_id- Id of the post for which the request will be refused.receiver- Address of the request receiver.
Auto Trait Implementations§
impl Freeze for PostsMsg
impl RefUnwindSafe for PostsMsg
impl Send for PostsMsg
impl Sync for PostsMsg
impl Unpin for PostsMsg
impl UnwindSafe for PostsMsg
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