Skip to main content

kcl_api/
ast.rs

1use parse_display::Display;
2use parse_display::FromStr;
3use schemars::JsonSchema;
4use serde::Deserialize;
5use serde::Serialize;
6
7pub mod node_path;
8
9#[derive(Debug, Default, Clone, Copy, Deserialize, Serialize, PartialEq, ts_rs::TS, FromStr, Display, JsonSchema)]
10#[ts(export)]
11#[serde(rename_all = "snake_case")]
12#[display(style = "snake_case")]
13pub enum ItemVisibility {
14    #[default]
15    Default,
16    Export,
17}
18
19impl ItemVisibility {
20    pub fn is_default(&self) -> bool {
21        matches!(self, Self::Default)
22    }
23}