Skip to main content

trieve_client/models/
search_type.rs

1/*
2 * Trieve API
3 *
4 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5 *
6 * The version of the OpenAPI document: 0.11.7
7 * Contact: developers@trieve.ai
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// 
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum SearchType {
16    #[serde(rename = "search")]
17    Search,
18    #[serde(rename = "autocomplete")]
19    Autocomplete,
20    #[serde(rename = "search_over_groups")]
21    SearchOverGroups,
22    #[serde(rename = "search_within_groups")]
23    SearchWithinGroups,
24
25}
26
27impl ToString for SearchType {
28    fn to_string(&self) -> String {
29        match self {
30            Self::Search => String::from("search"),
31            Self::Autocomplete => String::from("autocomplete"),
32            Self::SearchOverGroups => String::from("search_over_groups"),
33            Self::SearchWithinGroups => String::from("search_within_groups"),
34        }
35    }
36}
37
38impl Default for SearchType {
39    fn default() -> SearchType {
40        Self::Search
41    }
42}
43