(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") (enum-opt-empty "yellow" (comment "A bind to yellow color") ) (enum-opt-empty "red" ; (comment "A bind to red color") ) (enum-opt-empty "green" (comment "A bind to green color") (enum-opt-rename "Green") ) (enum-opt-tuple "color-rgb" ;(enum-opt-rename "ColorRgb") (comment "An RGB color space") (enum-opt-fields (field anon (f/uint64 ["arg_r"])) (field anon (f/uint64 ["arg_g"])) (field anon (f/uint64 ["arg_b"])) ) ) (enum-opt-struct "color-rgba-profile" (enum-opt-rename "ColorRgbaProfile") (comment "A RGBA color bind and profile") (enum-opt-fields (field "profile_name" (f/string ["arg_profile_name"])) (field "col_r" (f/uint64 ["p_color" "arg_r"])) (field "col_g" (f/uint64 ["p_color" "arg_g"])) (field "col_b" (f/uint64 ["p_color" "arg_b"])) (field "col_a" (f/uint64 ["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 } ; }