figma_api/models/
easing.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/// Easing : Describes an easing curve.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Easing {
17    /// The type of easing curve.
18    #[serde(rename = "type")]
19    pub r#type: models::EasingType,
20    #[serde(rename = "easingFunctionCubicBezier", skip_serializing_if = "Option::is_none")]
21    pub easing_function_cubic_bezier: Option<Box<models::EasingEasingFunctionCubicBezier>>,
22    #[serde(rename = "easingFunctionSpring", skip_serializing_if = "Option::is_none")]
23    pub easing_function_spring: Option<Box<models::EasingEasingFunctionSpring>>,
24}
25
26impl Easing {
27    /// Describes an easing curve.
28    pub fn new(r#type: models::EasingType) -> Easing {
29        Easing {
30            r#type,
31            easing_function_cubic_bezier: None,
32            easing_function_spring: None,
33        }
34    }
35}
36