pub trait Post {
// Required methods
fn content_warning(&self) -> Option<&str>;
fn is_sensitive(&self) -> bool;
fn mentions(&self) -> Vec<Mention<'_>>;
fn hashtags(&self) -> Vec<&str>;
fn quote(&self) -> Option<&Iri>;
}Expand description
What a post says, the same way for every kind of post.
Required Methods§
Sourcefn content_warning(&self) -> Option<&str>
fn content_warning(&self) -> Option<&str>
The post’s content warning: its summary, which Mastodon and Misskey
both show in front of the content, collapsed. None when it has none.
Sourcefn is_sensitive(&self) -> bool
fn is_sensitive(&self) -> bool
Whether the post’s media is marked sensitive.
The hashtags the post carries, from its tag, without their #.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".