Skip to main content

onspring/models/
enums.rs

1use serde::{Deserialize, Serialize};
2
3/// The format of data returned by the API.
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
5pub enum DataFormat {
6  Raw,
7  Formatted,
8}
9
10/// The type of report data to retrieve.
11#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
12pub enum ReportDataType {
13  ReportData,
14  ChartData,
15}
16
17/// The type of a field's value in a record.
18#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
19pub enum ValueType {
20  String,
21  Integer,
22  Decimal,
23  Date,
24  TimeSpan,
25  Guid,
26  StringList,
27  IntegerList,
28  GuidList,
29  AttachmentList,
30  ScoringGroupList,
31  FileList,
32}
33
34/// The output type of a formula field.
35#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
36pub enum FormulaOutputType {
37  Text,
38  Numeric,
39  DateAndTime,
40  ListValue,
41}
42
43/// Whether a field allows single or multiple selections.
44#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
45pub enum Multiplicity {
46  SingleSelect,
47  MultiSelect,
48}