pub mod matched_substring;
pub mod prediction;
pub mod status;
pub mod structured_format;
pub mod term;
use crate::places::place_autocomplete::response::{prediction::Prediction, status::Status}; use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
pub struct Response {
#[serde(alias = "predictions")]
#[serde(default)]
pub predictions: Vec<Prediction>,
#[serde(alias = "status")]
pub status: Status,
#[serde(alias = "error_message")]
pub error_message: Option<String>,
#[serde(alias = "info_messages")]
#[serde(default)]
pub info_messages: Vec<String>,
}
impl std::str::FromStr for Response {
type Err = serde_json::error::Error;
fn from_str(s: &str) -> Result<Self, serde_json::error::Error> {
serde_json::from_str(s)
} }