trieve_client/models/
search_sort_by.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 SearchSortBy {
16    #[serde(rename = "created_at")]
17    CreatedAt,
18    #[serde(rename = "latency")]
19    Latency,
20    #[serde(rename = "top_score")]
21    TopScore,
22
23}
24
25impl ToString for SearchSortBy {
26    fn to_string(&self) -> String {
27        match self {
28            Self::CreatedAt => String::from("created_at"),
29            Self::Latency => String::from("latency"),
30            Self::TopScore => String::from("top_score"),
31        }
32    }
33}
34
35impl Default for SearchSortBy {
36    fn default() -> SearchSortBy {
37        Self::CreatedAt
38    }
39}
40