/* * Author: Ruben Fiszel * Copyright: Windmill Labs, Inc 2022 * This file and its contents are licensed under the AGPLv3 License. * Please see the included NOTICE for copyright information and * LICENSE-AGPL for a copy of the license. */ use serde::Serialize; #[derive(Serialize, Debug, PartialEq)] pub struct MainArgSignature { pub star_args: bool, pub star_kwargs: bool, pub args: Vec, } #[derive(Serialize, Clone, Debug, PartialEq)] #[serde(rename_all(serialize = "lowercase"))] pub struct ObjectProperty { pub key: String, pub typ: Box, } #[derive(Serialize, Clone, Debug, PartialEq)] #[serde(rename_all(serialize = "lowercase"))] pub enum Typ { Str(Option>), Int, Float, Bool, List(Box), Bytes, Datetime, Resource(String), Email, Sql, Object(Vec), Unknown, } #[derive(Serialize, Clone, Debug, PartialEq)] pub struct Arg { pub name: String, pub otyp: Option, pub typ: Typ, pub default: Option, pub has_default: bool, }