23 lines
446 B
Rust
23 lines
446 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Serialize)]
|
|
pub struct SearchQueryParams {
|
|
pub query: String,
|
|
pub facets: String,
|
|
pub offset: Option<u32>,
|
|
pub limit: Option<u32>,
|
|
}
|
|
|
|
#[derive(Deserialize)]
|
|
pub struct SearchResult {
|
|
pub hits: Vec<SearchHit>,
|
|
pub total_hits: u32,
|
|
}
|
|
|
|
#[derive(Deserialize)]
|
|
pub struct SearchHit {
|
|
pub slug: String,
|
|
pub author: String,
|
|
pub title: String,
|
|
pub description: String,
|
|
}
|