twitter_stream_message/
types.rs

1//! Common types used across the crate.
2
3pub use json::Map as JsonMap;
4pub use json::Number as JsonNumber;
5pub use json::Value as JsonValue;
6
7use chrono::{DateTime as ChronoDateTime, Utc};
8
9string_enums! {
10    /// Represents the `filter_level` field in Tweets.
11    #[derive(Clone, Debug)]
12    pub enum FilterLevel<'a> {
13        None("none"),
14        Low("low"),
15        Medium("medium");
16        Custom(_),
17    }
18
19    /// Represents the `withheld_scope` field in `Tweet` and `User`.
20    #[derive(Clone, Debug)]
21    pub enum WithheldScope<'a> {
22        Status("status"),
23        User("user");
24        Custom(_),
25    }
26}
27
28pub type DateTime = ChronoDateTime<Utc>;