mastodon_async/
data.rs

1use std::borrow::Cow;
2
3use serde::{Deserialize, Serialize};
4
5/// Raw data about mastodon app. Save `Data` using `serde` to prevent needing
6/// to authenticate on every run.
7#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, Default)]
8pub struct Data {
9    /// Base url of instance eg. `https://botsin.space`.
10    pub base: Cow<'static, str>,
11    /// The client's id given by the instance.
12    pub client_id: Cow<'static, str>,
13    /// The client's secret given by the instance.
14    pub client_secret: Cow<'static, str>,
15    /// Url to redirect back to your application from the instance signup.
16    pub redirect: Cow<'static, str>,
17    /// The client's access token.
18    pub token: Cow<'static, str>,
19}