pub struct PicturePost {
pub title: Option<String>,
pub description: String,
pub pictures: Vec<MediaAttachment>,
pub content_warning: Option<String>,
pub tagged_users: Vec<PictureTaggedUser>,
pub media_types: Vec<String>,
pub hashes: Vec<String>,
pub hashtags: Vec<String>,
pub location: Option<String>,
pub geohash: Option<String>,
pub language_labels: Vec<String>,
pub extra_tags: Vec<Tag>,
}Expand description
Typed bundle for a kind: 20 picture event.
Fields§
§title: Option<String>title tag (recommended).
description: StringFree-form description (mirrors .content).
pictures: Vec<MediaAttachment>Picture variants (one or more imeta tags).
content_warning: Option<String>Optional content-warning reason for NSFW content.
tagged_users: Vec<PictureTaggedUser>p tagged users.
media_types: Vec<String>m MIME-type filters (de-duped from picture variants).
hashes: Vec<String>x SHA-256 hashes (de-duped from picture variants).
t hashtags (lower-cased).
location: Option<String>Optional location city/country line.
geohash: Option<String>Optional g geohash.
language_labels: Vec<String>L/l ISO-639-1 language labels (raw values).
Forward-compatible passthrough for unknown tags.
Implementations§
Source§impl PicturePost
impl PicturePost
Sourcepub fn new(
description: impl Into<String>,
pictures: Vec<MediaAttachment>,
) -> Self
pub fn new( description: impl Into<String>, pictures: Vec<MediaAttachment>, ) -> Self
Construct a new picture post.
Sourcepub fn from_event(event: &Event) -> Result<Self, PictureError>
pub fn from_event(event: &Event) -> Result<Self, PictureError>
Trait Implementations§
Source§impl Clone for PicturePost
impl Clone for PicturePost
Source§fn clone(&self) -> PicturePost
fn clone(&self) -> PicturePost
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 PicturePost
impl Debug for PicturePost
Source§impl Default for PicturePost
impl Default for PicturePost
Source§fn default() -> PicturePost
fn default() -> PicturePost
Returns the “default value” for a type. Read more
impl Eq for PicturePost
Source§impl PartialEq for PicturePost
impl PartialEq for PicturePost
impl StructuralPartialEq for PicturePost
Auto Trait Implementations§
impl Freeze for PicturePost
impl RefUnwindSafe for PicturePost
impl Send for PicturePost
impl Sync for PicturePost
impl Unpin for PicturePost
impl UnsafeUnpin for PicturePost
impl UnwindSafe for PicturePost
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.