#[derive(Debug, Clone)]
pub struct Query(String, String);
impl Query {
pub fn from_str(query: &str) -> Query {
let query_parts = query.split_once(' ').unwrap_or((query, ""));
Query(query_parts.0.to_string(), query_parts.1.to_string())
}
pub fn prefix(&self) -> &str {
&self.0
}
pub fn query(&self) -> &str {
&self.1
}
pub fn all(&self) -> String {
format!("{} {}", self.0, self.1)
}
}