Expand description
Policy for &mut T parameters that a generated binding must hand back to its caller.
A core function shaped like fn tag_record(record: &mut Record) cannot be bound as an
owned by-value parameter returning void: every backend converts the host DTO into an owned
_core intermediate, mutates that, and drops it. The caller’s value is untouched and there
is no diagnostic — the call silently does nothing.
Every backend that lowers such a parameter must consult this module so the eight host languages agree on one answer instead of each inventing its own.
The supported shape is exactly one &mut T DTO parameter on a unit-returning function.
The binding then returns the updated T. Any other &mut DTO shape is rejected at
generation time by reject_unsupported_writeback rather than emitted lossily.
Functions§
- effective_
return_ type - The return type a binding must declare in place of
return_type, when a write-back applies. - is_
writeback_ param - Whether
paramis a&mut Tparameter whoseTis a non-opaque (serde DTO) named type. - reject_
unsupported_ writeback - Reject
&mut TDTO shapes no host language in the matrix can express. - writeback_
param - The single
&mut TDTO parameter a binding must write back, when the signature is supported. - writeback_
params - Every
&mut TDTO parameter inparams, in declaration order. - writeback_
type_ name - The named DTO type a binding must return for
param, e.g.Recordforrecord: &mut Record.