pub struct DraftPost<'a> {
pub embed_externals: Option<Vec<DraftEmbedExternal<'a>>>,
pub embed_images: Option<Vec<DraftEmbedImage<'a>>>,
pub embed_records: Option<Vec<DraftEmbedRecord<'a>>>,
pub embed_videos: Option<Vec<DraftEmbedVideo<'a>>>,
pub labels: Option<SelfLabels<'a>>,
pub text: CowStr<'a>,
pub extra_data: Option<BTreeMap<SmolStr, Data<'a>>>,
}Expand description
One of the posts that compose a draft.
Fields§
§embed_externals: Option<Vec<DraftEmbedExternal<'a>>>§embed_images: Option<Vec<DraftEmbedImage<'a>>>§embed_records: Option<Vec<DraftEmbedRecord<'a>>>§embed_videos: Option<Vec<DraftEmbedVideo<'a>>>§labels: Option<SelfLabels<'a>>Self-label values for this post. Effectively content warnings.
text: CowStr<'a>The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts.
extra_data: Option<BTreeMap<SmolStr, Data<'a>>>Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for DraftPost<'a>
impl<'de: 'a, 'a> Deserialize<'de> for DraftPost<'a>
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> IntoStatic for DraftPost<'a>
impl<'a> IntoStatic for DraftPost<'a>
Source§impl<'a> LexiconSchema for DraftPost<'a>
impl<'a> LexiconSchema for DraftPost<'a>
Source§fn lexicon_doc() -> LexiconDoc<'static>
fn lexicon_doc() -> LexiconDoc<'static>
Generate the lexicon document for this type Read more
Source§fn validate(&self) -> Result<(), ConstraintError>
fn validate(&self) -> Result<(), ConstraintError>
Validate an instance against lexicon constraints Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether this type should be inlined vs referenced Read more
impl<'a> Eq for DraftPost<'a>
impl<'a> StructuralPartialEq for DraftPost<'a>
Auto Trait Implementations§
impl<'a> Freeze for DraftPost<'a>
impl<'a> RefUnwindSafe for DraftPost<'a>
impl<'a> Send for DraftPost<'a>
impl<'a> Sync for DraftPost<'a>
impl<'a> Unpin for DraftPost<'a>
impl<'a> UnsafeUnpin for DraftPost<'a>
impl<'a> UnwindSafe for DraftPost<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.