Benign rust 392 installs Download

amethystate-codegen 0.23.2

“A state manager for Rust applications”

Release published within seven daysThree releases published within 24 hours
SHA-256e8d169c666478579ff604b012c4c84bc97e5b5a6ec90d0a91c61384577c172ae

Evidence

imports amethystate_core::FieldKind lib.rs · lines 1–15
1mod backends;
2pub use backends::*;
3
4use amethystate_core::{FieldKind, SchemaExportEntry};
5use heck::ToLowerCamelCase;
6use std::collections::BTreeMap;
7use std::fmt;
8use std::io;
9use std::path::Path;
10
11pub trait FrameworkCodegen {
⋯4 lines
Writes a file with Rust fs::write lib.rs · lines 109–116
109:6… std::fs::create_dir_all(parent)?;
110 }
111 std::fs::write(out_path, ts)?;
112 Ok(())
113 }
114
115 fn ts_node(&self, entry: &SchemaExportEntry, used: &mut TsUsed) -> String {
116 us …
imports amethystate::amethystate two_structs_of_one_name.rs · lines 1–8
1use amethystate_codegen::{CodegenRegistry, Collision};
2
3mod window {
4 use amethystate::amethystate;
5
6 #[amethystate(prefix = "window")]
7 pub struct Config {
8 #[amestate(default = 80 …
#[test] attribute two_structs_of_one_name.rs · lines 18–32
18:17… te(default = String::new())]
19 pub host: String,
20 }
21}
22
23#[test]
24fn two_structs_of_one_name_are_refused_rather_than_one_picked() {
25 let refused = CodegenRegistry::new().err();
⋯7 lines
imports super::* tests.rs · lines 69–78
69:26… 0u8)]
70 pub launches: u8,
71}
72
73mod v1 {
74 use super::*;
75
76 #[amethystate(prefix = "lined", version = 1)]
77 pub struct Lined {
78 #[amestate(d …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.