Expand description
Functionality to generate a rust source code module which represents Entity Data Model items for
an OData endpoint. This generation can be performed as a procedural macro from the
odata_client_derive
crate, or as a build.rs
action, using the
write_module_build_artifact
or generate_module
functions.
Structs§
Traits§
- Entity
Model Filter - Implemented by types which can specify the entity model item for which to generate client code.
See the implementors which can be used as arguments for code generation
functions (e.g.
generate_module
,write_module_build_artifact
).
Functions§
- generate_
module - Generate OData client token stream from XML string.
- write_
module_ build_ artifact - Convenience function to be used in a build script (
build.rs
). Generates an OData client module from the provided metadata XML, and writes to a location in the build output directory. Source XML filepath and target code filepath are specified relative to the crate/workspace root. To use the generated module, the user should manually declare a bodiless module within their code, and add the#[path = "..."]
attribute, specifying the path to the generated module, relative to the consuming source file. E.g.: