Skip to content

Commit

Permalink
prost-build: document CodeGenerator::boxed
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabaluev committed Mar 29, 2024
1 parent d725ae5 commit c64f1f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions prost-build/src/code_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,11 @@ impl<'a> CodeGenerator<'a> {
}
}

/// Returns whether the Rust type for this field needs to be `Box<_>`.
///
/// This can be explicitly configured with `Config::boxed`, or necessary
/// to prevent an infinitely sized type definition in case when the type of
/// a non-repeated message field transitively contains the message itself.
fn boxed(
&self,
field: &FieldDescriptorProto,
Expand Down

0 comments on commit c64f1f2

Please sign in to comment.