Struct mastodon_async::status_builder::NewStatus
source · pub struct NewStatus {
pub status: Option<String>,
pub in_reply_to_id: Option<String>,
pub media_ids: Option<Vec<String>>,
pub sensitive: Option<bool>,
pub spoiler_text: Option<String>,
pub visibility: Option<Visibility>,
pub language: Option<Language>,
pub content_type: Option<String>,
}
Expand description
Represents a post that can be sent to the POST /api/v1/status endpoint
See also the API documentation
Fields§
§status: Option<String>
The text content of the status. If media_ids is provided, this becomes optional. Attaching a poll is optional while status is provided.
Note that this means there is at this time no check provided by this
type to ensure that this value is set when it is required by the API,
and an APIError should be expected from crate::Mastodon::new_status()
in this case.
in_reply_to_id: Option<String>
ID of the status being replied to, if status is a reply.
media_ids: Option<Vec<String>>
Include Attachment IDs to be attached as media. If provided, status becomes optional, and poll cannot be used.
sensitive: Option<bool>
Mark status and attached media as sensitive? Defaults to false.
spoiler_text: Option<String>
Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field.
visibility: Option<Visibility>
Sets the visibility of the posted status to public, unlisted, private, direct.
language: Option<Language>
ISO 639 language code for this status.
content_type: Option<String>
Ignored by Mastodon servers, sets the content type for the status.
Mastodon “toots” are always text/plain
, regardless of this value.
Trait Implementations§
source§impl PartialEq for NewStatus
impl PartialEq for NewStatus
impl Eq for NewStatus
impl StructuralPartialEq for NewStatus
Auto Trait Implementations§
impl RefUnwindSafe for NewStatus
impl Send for NewStatus
impl Sync for NewStatus
impl Unpin for NewStatus
impl UnwindSafe for NewStatus
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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
key
and return true
if they are equal.