Struct elefren::status_builder::StatusBuilder[][src]

pub struct StatusBuilder {
    pub status: String,
    pub in_reply_to_id: Option<u64>,
    pub media_ids: Option<Vec<u64>>,
    pub sensitive: Option<bool>,
    pub spoiler_text: Option<String>,
    pub visibility: Option<Visibility>,
    pub language: Option<Language>,
}

A builder pattern struct for constructing a status.

Example


let status = StatusBuilder {
    status: "a status".to_string(),
    sensitive: Some(true),
    spoiler_text: Some("a CW".to_string()),
    language: Some(Language::Eng),
    ..Default::default()
};

Fields

The text of the status.

Ids of accounts being replied to.

Ids of media attachments being attached to the status.

Whether current status is sensitive.

Text to precede the normal status text.

Visibility of the status, defaults to Public.

Language code of the status

Methods

impl StatusBuilder
[src]

Create a new status with text.

use elefren::prelude::*;

let status = StatusBuilder::new("Hello World!");

Trait Implementations

impl Debug for StatusBuilder
[src]

Formats the value using the given formatter. Read more

impl Default for StatusBuilder
[src]

Returns the "default value" for a type. Read more

impl Clone for StatusBuilder
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for StatusBuilder
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations