2022-11-27 14:44:43 +00:00
|
|
|
//! A module containing info relating to a search result.
|
|
|
|
|
2022-12-07 20:58:28 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
2022-11-29 23:50:29 +00:00
|
|
|
|
2022-11-27 14:44:43 +00:00
|
|
|
use super::{
|
|
|
|
prelude::{Account, Status},
|
|
|
|
status::Tag,
|
|
|
|
};
|
|
|
|
|
|
|
|
/// A struct containing results of a search, with `Tag` objects in the
|
|
|
|
/// `hashtags` field
|
2022-12-07 20:58:28 +00:00
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
2022-12-22 17:37:52 +00:00
|
|
|
pub struct SearchResult {
|
2022-11-27 14:44:43 +00:00
|
|
|
/// An array of matched Accounts.
|
|
|
|
pub accounts: Vec<Account>,
|
|
|
|
/// An array of matched Statuses.
|
|
|
|
pub statuses: Vec<Status>,
|
|
|
|
/// An array of matched hashtags, as `Tag` objects.
|
|
|
|
pub hashtags: Vec<Tag>,
|
|
|
|
}
|