Unmodified copy of the tsclientlib workspace crates (MIT OR Apache-2.0) with the tsdeclarations submodule (83cb8a9) flattened into plain files. See crates/proto/UPSTREAM.md for the path mapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
27 lines
534 B
Rust
27 lines
534 B
Rust
use std::result::Result;
|
|
|
|
use crate::*;
|
|
|
|
use once_cell::sync::Lazy;
|
|
|
|
pub const DATA_STR: &str =
|
|
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/declarations/Permissions.csv"));
|
|
|
|
pub static DATA: Lazy<Permissions> = Lazy::new(|| {
|
|
Permissions(
|
|
csv::Reader::from_reader(DATA_STR.as_bytes())
|
|
.deserialize()
|
|
.collect::<Result<Vec<_>, _>>()
|
|
.unwrap(),
|
|
)
|
|
});
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct EnumValue {
|
|
pub name: String,
|
|
pub doc: String,
|
|
}
|
|
|
|
#[derive(Default, Debug)]
|
|
pub struct Permissions(pub Vec<EnumValue>);
|