(version 1000) (serializator "use1" (procedure "yellow" (procedure_empty)) (procedure "red" (procedure_empty)) (procedure "green" (procedure_empty)) (procedure "color-rgb" (arg "arg_r" uint) (arg "arg_g" uint) (arg "arg_b" uint) ) (procedure "color-rgba-profile" (arg "arg_profile_name" string) (arg "arg_a" uint) (proc "p_color" '("color-rgb")) ) (rootprocedure (proc "p_color" '("yellow" "red" "green" "color-rgb" "color-rgba-profile")) ) (enum "TestUseEnum" '("yellow" "red" "green" "color-rgb" "color-rgba-profile") (comment "An enum with the color profiles") (enumopt "yellow" "Yellow" (comment "A bind to yellow color") (empty) ) (enumopt "red" "Red" ; (comment "A bind to red color") (empty) ) (enumopt "green" "Green" (comment "A bind to green color") (empty) ) (enumopt "color-rgb" "ColorRgb" (comment "An RGB color space") (vec (field anon (f/uint '("arg_r"))) (field anon (f/uint '("arg_g"))) (field anon (f/uint '("arg_b"))) ) ) (enumopt "color-rgba-profile" "ColorRgbaProfile" (comment "A RGBA color bind and profile") (struct none none (field "profile_name" (f/string '("arg_profile_name"))) (field "col_r" (f/uint '("p_color" "arg_r"))) (field "col_g" (f/uint '("p_color" "arg_g"))) (field "col_b" (f/uint '("p_color" "arg_b"))) (field "col_a" (f/uint '("arg_a"))) ) ) ) (rootstruct "TestUseEnum" (field anon (f/enum '("p_color"))) ) ) ; serialized to ; pub enum TestUseEnum ; { ; Yellow, ; Red, ; Green, ; ColorRgb(u64, u64, u64), ; ColorRgbaProfile{ profile_name: String, col_r: u64, col_g: u64, col_b: u64, col_a: u64 } ; }