figma_api/models/
style_type.rs

1/*
2 * Figma API
3 *
4 * This is the OpenAPI specification for the [Figma REST API](https://www.figma.com/developers/api).  Note: we are releasing the OpenAPI specification as a beta given the large surface area and complexity of the REST API. If you notice any inaccuracies with the specification, please [file an issue](https://github.com/figma/rest-api-spec/issues).
5 *
6 * The version of the OpenAPI document: 0.31.0
7 * Contact: support@figma.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// StyleType : The type of style
15/// The type of style
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum StyleType {
18    #[serde(rename = "FILL")]
19    Fill,
20    #[serde(rename = "TEXT")]
21    Text,
22    #[serde(rename = "EFFECT")]
23    Effect,
24    #[serde(rename = "GRID")]
25    Grid,
26
27}
28
29impl std::fmt::Display for StyleType {
30    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31        match self {
32            Self::Fill => write!(f, "FILL"),
33            Self::Text => write!(f, "TEXT"),
34            Self::Effect => write!(f, "EFFECT"),
35            Self::Grid => write!(f, "GRID"),
36        }
37    }
38}
39
40impl Default for StyleType {
41    fn default() -> StyleType {
42        Self::Fill
43    }
44}
45