pub struct CodeGenBuilder { /* private fields */ }
Expand description

Builder for the generic code generation of server and clients.

Implementations§

Create a new code gen builder with default options.

Enable code generation to emit the package name.

Attributes that will be added to mod and struct items.

Reference Attributes for more information.

Enable transport code to be generated, this requires tonic’s transport feature.

This allows codegen level control of generating the transport code and is a work around when other crates in a workspace enable this feature.

Enable compiling well knonw types, this will force codegen to not use the well known types from prost-types.

Disable comments based on a proto path.

Generate client code based on Service.

This takes some Service and will generate a TokenStream that contains a public module with the generated client.

Generate server code based on Service.

This takes some Service and will generate a TokenStream that contains a public module with the generated client.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.