pub fn honour_publisher(
type_name: &str,
topic: &str,
qos: QoSProfile,
) -> Result<QoSProfile, NodeError>Expand description
issue 1608 – the PUBLISHER counterpart of honour: the QoS a publisher
registers with once the contract has had its say.
The rule is policy_verdict’s, with the POLICY direction reversed from a
subscription’s because RxO is directional: a publisher that asked for less
than the contract declares is RAISED to the declaration (the build reserved
it, and every reader that matched the lower offer still matches), and one
that asked for more is REFUSED (lowering it could break a match, keeping it
rides storage nobody reserved). The depth rule is the subscription’s.
Called at every publisher registration – the Rust seams AND the C/C++ FFI
seams. Unlike a subscription, a publisher has no call-site seam in C or C++
that already took the declaration (NROS_SUBSCRIBE’s three-argument form
has no publisher counterpart, and the compile-time table carries no
publisher rows), so the FFI seams honour too rather than strict-checking: a
strict check there would refuse every create_publisher_in<M>(topic) whose
default profile the contract refines.
#[inline] for honour’s measured reason: a None table must fold the
call to Ok(qos) so an image with no contract is byte-identical.