pub struct PostProcess {
pub relative_imports: bool,
pub fix_pyi: bool,
pub create_package: bool,
pub exclude_google: bool,
pub pyright_header: bool,
pub module_suffixes: Vec<String>,
}Expand description
Post-processing configuration options.
Controls how generated files are transformed after initial generation, including import rewriting, package structure creation, and header addition.
Fields§
§relative_imports: boolConvert absolute imports to relative imports within generated files.
fix_pyi: boolFix type annotations in .pyi files (reserved for future use).
create_package: boolCreate init.py files in all directories to make packages importable. Set to false for namespace packages (PEP 420).
exclude_google: boolExclude google.protobuf imports from relative import conversion.
pyright_header: boolAdd Pyright suppression headers to generated _pb2.py and _pb2_grpc.py files.
module_suffixes: Vec<String>File suffixes to process during post-processing. Default includes _pb2.py, _pb2.pyi, _pb2_grpc.py, _pb2_grpc.pyi.
Trait Implementations§
Source§impl Clone for PostProcess
impl Clone for PostProcess
Source§fn clone(&self) -> PostProcess
fn clone(&self) -> PostProcess
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PostProcess
impl RefUnwindSafe for PostProcess
impl Send for PostProcess
impl Sync for PostProcess
impl Unpin for PostProcess
impl UnwindSafe for PostProcess
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more