#[non_exhaustive]pub enum FdsEmbedding<'a> {
Inline,
Sidecar {
file_name: &'a str,
mode: IncludeMode<'a>,
},
}Expand description
How shared_descriptor_root_module embeds the descriptor set into the
generated tree. Both forms decode to byte-identical runtime data; they
differ only in generated-source size and whether a sidecar file is written.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Inline
Embed the bytes inline as a byte-string literal. Self-contained: no extra
file, but the descriptor bytes cost several times their size in
generated Rust source. This is all the plugin path can do, since
protoc’s CodeGeneratorResponse carries only UTF-8 text.
Sidecar
include_bytes! a sidecar file the caller writes next to the generated
tree, keeping the bytes out of the Rust source entirely. file_name is
the sidecar’s name; mode mirrors generate_module_tree’s —
IncludeMode::Relative for a checked-in sibling,
IncludeMode::OutDir for build-script output. The caller is
responsible for writing fds_bytes to that file.