pub struct SubmitPostDataBuilder {
pub public_key: Option<String>,
pub parent_post_hash_hex: Option<String>,
pub body: Option<String>,
pub image_urls: Option<Vec<String>>,
pub video_urls: Option<Vec<String>>,
pub fee_rate: Option<u64>,
pub is_hidden: Option<bool>,
pub extra_data: Option<HashMap<String, String>>,
}Expand description
Builder for building a submit post data
Fields§
§public_key: Option<String>Public key of the user making a new post, editing a post, or making a comment
parent_post_hash_hex: Option<String>Only used if making a comment. The post hash hex of the post your commenting on.
body: Option<String>The body of your post
image_urls: Option<Vec<String>>Any and all images for the post
video_urls: Option<Vec<String>>Any and all videos for the post
fee_rate: Option<u64>Min fee rate nanos per kb, defaults to 1250
Used to “delete” a post, defaults to false
extra_data: Option<HashMap<String, String>>An optional map of any meta data for the post
Implementations§
Source§impl SubmitPostDataBuilder
impl SubmitPostDataBuilder
pub fn new() -> Self
Sourcepub fn public_key(self, public_key: String) -> Self
pub fn public_key(self, public_key: String) -> Self
Public key of the user making a new post, editing a post, or making a comment
Sourcepub fn parent_post_hash_hex(self, post_hash_hex: String) -> Self
pub fn parent_post_hash_hex(self, post_hash_hex: String) -> Self
Only used if making a comment. The post hash hex of the post your commenting on.
Sourcepub fn image_urls(self, image_urls: Vec<String>) -> Self
pub fn image_urls(self, image_urls: Vec<String>) -> Self
Any and all images for the post
Sourcepub fn video_urls(self, video_urls: Vec<String>) -> Self
pub fn video_urls(self, video_urls: Vec<String>) -> Self
Any and all videos for the post
Used to “delete” a post, defaults to false
Sourcepub fn extra_data(self, extra_data: HashMap<String, String>) -> Self
pub fn extra_data(self, extra_data: HashMap<String, String>) -> Self
An optional map of any meta data for the post
Trait Implementations§
Source§impl Debug for SubmitPostDataBuilder
impl Debug for SubmitPostDataBuilder
Source§impl<'de> Deserialize<'de> for SubmitPostDataBuilder
impl<'de> Deserialize<'de> for SubmitPostDataBuilder
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
Auto Trait Implementations§
impl Freeze for SubmitPostDataBuilder
impl RefUnwindSafe for SubmitPostDataBuilder
impl Send for SubmitPostDataBuilder
impl Sync for SubmitPostDataBuilder
impl Unpin for SubmitPostDataBuilder
impl UnwindSafe for SubmitPostDataBuilder
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