1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 ZeroDDS Contributors
//! The C column's decoder: [`crate::emit::decode`] bound to the C
//! backend.
//!
//! The walk moved to `emit/decode.rs` when it stopped being C's alone,
//! the same as the encoder's did. What is left here is the binding, and
//! the one step the generic walk cannot take: prepending the Table 9
//! defaulters.
//!
//! ## Why the defaulters are here and not in the walk
//!
//! A member the stream did not carry takes Table 9's value, and in C
//! that means a generated function per type: a struct-valued default is
//! not an expression C can assign. Which types need one is read off the
//! decoders that were generated — `c_defaulters_called_by` looks at
//! them — and a target that writes its defaults as literals needs no
//! such pass at all. So the pass belongs to the column, not to the walk.
use crateC;
use cratedecode;
use crateEncodeError;
use ;
use Id;
use LayoutKey;
use c;
pub use crateCodecOptions as CCodecOptions;
/// The name of the C decoder function for a type.
///
/// zerodds-lint: recursion-depth 1 — this does not recurse. The callee
/// is `decode::decoder_name::<C>`; `dds_bounded_recursion` compares only the last
/// segment of a call path, so it reads as a self-call.
/// Build the C decoder for every type in the model, under one plan.
///
/// # Errors
/// As [`decode::decoder`], and when a Table 9 defaulter cannot be built.
/// The C decoder for the types one root reaches, and no others.
///
/// # Errors
/// As [`c_decoder`].
/// The Table 9 defaulters, ahead of the decoders that call them.
///
/// `c_defaulters_called_by` emits one only for a type some member can
/// actually go missing at, so nothing it returns is a `static` function
/// with no caller — which the probe compiles as an error.