pub fn rustcode_generate(
serializator: Arc<Serializator>,
any_type_derives: Vec<RustCodeDerives>,
any_type_jails: Vec<String>,
serde_use_path: Option<String>,
) -> StaticSchemeRes<RustCode>
Expand description
Generates a Rust code from the serializator (a static scheme). This is a simple realizaton. For compels, see examples.
§Arguements
-
serializator
- a Serializator atomic reference to convert. -
any_type_derives
- a list of RustCodeDerives for the enum for the auto type. Sets the “##[derive…]” for this enum. If the auto type is not used, then can be set empty. -
any_type_jails
- additional “##[(items)]” items to add for the auto type enum. Same conditions as for theany_type_derives
. -
serde_use_path
- overrides the “use serde::{Serialize, Deserialize}” path. The variable should be set to the last element in the path i.e use crate::serde::.
§Returns
A Result as alias StaticSchemeRes is returned.
-
Result::Ok is returned with a result as RustCode
-
Result::Err is returned with error description.