Skip to content

Commit fb898f7

Browse files
committed
Add some notes about not reusing builder after calling FunctionCall::encode
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
1 parent 9bb6c71 commit fb898f7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/hyperlight_common/src/flatbuffer_wrappers/function_call.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ impl FunctionCall {
7474
}
7575

7676
/// Encodes self into the given builder and returns the encoded data.
77+
///
78+
/// # Notes
79+
///
80+
/// The builder should not be reused after a call to encode, since this function
81+
/// does not reset the state of the builder. If you want to reuse the builder,
82+
/// you'll need to reset it first.
7783
pub fn encode<'a>(&self, builder: &'a mut FlatBufferBuilder) -> &'a [u8] {
7884
let function_name = builder.create_string(&self.function_name);
7985

0 commit comments

Comments
 (0)