MCPcopy Create free account

hub / github.com/dcSpark/cddl-codegen / functions

Functions1,061 in github.com/dcSpark/cddl-codegen

↓ 3 callersMethodcustom_serialize
(mut self, func: String)
src/generation.rs:103
↓ 3 callersFunctiondecodeForeignEvidence
(fo?: ForeignOutcome)
cddl-matrix/verify.ts:919
↓ 3 callersFunctiondecodeForeignProbe
(id: string, matrixExample: string)
cddl-matrix/verify.ts:901
↓ 3 callersMethoddeserialize_generated
(&self, name: &RustIdent)
src/generation.rs:3653
↓ 3 callersMethoddeserialize_generated_for_type
( &self, types: &IntermediateTypes, field_type: &ConceptualRustType, )
src/generation.rs:3657
↓ 3 callersMethoddont_generate_deserialize
(&mut self, name: &RustIdent, reason: String)
src/generation.rs:3682
↓ 3 callersFunctionembedDetail
(detail: string, embedded?: boolean)
cddl-matrix/verify.ts:634
↓ 3 callersFunctionembedFallback
(id: string, example: string, cg: CodegenProbe, extraFlags: string[] = [])
cddl-matrix/verify.ts:613
↓ 3 callersFunctionempty_bar
Minimal bar decoded from hand-written CBOR: {1: null, "five": 5, "foo": 1337([]), "foo_map": {}}. Also the only profile-agnostic way to mint an empty
tests/multifile/tests.rs:41
↓ 3 callersFunctionencoding_fields_impl
( types: &IntermediateTypes, name: &str, ty: SerializingRustType, cli: &Cli, )
src/generation.rs:5169
↓ 3 callersMethodexpanded_mandatory_field_count
the minimum cbor length of this struct - can be useful for deserialization length checks does not count ANY type choice like types including Optional
src/intermediate.rs:1550
↓ 3 callersMethodfixed_field_count
Some(count) if it always has the same number of fields (ie no optional fields), None otherwise
src/intermediate.rs:2896
↓ 3 callersFunctionflatten_group_entries
Flatten single-choice `GroupEntry::InlineGroup`s into the parent entry list. A parenthesized group in entry position — `[(a, b)]` — is pure grouping,
src/parsing.rs:1165
↓ 3 callersFunctionfmtDur
(ms: number)
check.ts:307
↓ 3 callersMethodfor_wasm_member
If we were to store a value directly in a wasm-wrapper, this would be used.
src/intermediate.rs:1934
↓ 3 callersFunctiongenerate
Generate a standalone crate's source map for `spec` (writes to a unique temp `.cddl`). `--wasm=false` EXPLICITLY (the CLI default is true): both layer
src/tests/identifier_hazard_tests.rs:141
↓ 3 callersMethodgenerate_array_type
generate array type ie [Foo] generates Foos if not already created
src/generation.rs:3770
↓ 3 callersFunctiongenerated_source
Concatenate every generated file's source for `spec` (or panic with the generation error) — a coarse string surface for the fast-tier collision-proofi
src/tests/identifier_hazard_tests.rs:164
↓ 3 callersFunctionget_comments_if_group_parent
( parent_visitor: &'a ParentVisitor<'a, 'a>, cddl_type: &CDDLType<'a, 'a>, child: Option<&CDDLType
src/parsing.rs:2460
↓ 3 callersFunctionident_to_primitive
(ident: &CDDLIdent)
src/parsing.rs:289
↓ 3 callersFunctionis_identifier_reserved
(name: &str)
src/utils.rs:123
↓ 3 callersFunctionis_identifier_user_defined
(name: &str)
src/utils.rs:187
↓ 3 callersFunctionis_pinned
(cell: &Cell)
src/tests/dsl_position_tests.rs:472
↓ 3 callersFunctionmake_err_annotate_block
We need to execute field deserialization inside a closure in order to capture and annotate with the field name without having to put error annotation
src/generation.rs:4834
↓ 3 callersMethodmark_and_extract_content
(self, target: &mut Self)
src/generation.rs:413
↓ 3 callersMethodmark_used_as_key
(ty: &ConceptualRustType, used_as_key: &mut BTreeSet<RustIdent>)
src/intermediate.rs:726
↓ 3 callersFunctionmaterialize_at
( types: &IntermediateTypes, ty: &RustType, measure: i128, depth: u8, )
src/emit_tests.rs:1352
↓ 3 callersFunctionmint_struct
Mint a valid instance of a NAMED generated struct, recursing into its fields (depth-capped so recursion terminates: at the cap this returns `None`, wh
src/emit_tests.rs:1209
↓ 3 callersMethodneeds_bounds_check_if_inlined
(&self, types: &IntermediateTypes)
src/intermediate.rs:1641
↓ 3 callersFunctionnoArg
(id: string, tag: string)
cddl-matrix/corpus_detect.ts:176
↓ 3 callersFunctionoccur_kind
(o: &Occur)
examples/ast_roles.rs:75
↓ 3 callersFunctionops_from_log
Read `<static_dir>/<log_name>`, apply the `cddl-lib` → `--lib-name` substitution (the same substring replacement the whole log text goes through, so `
src/cargo_manifest.rs:502
↓ 3 callersFunctionparse_group_type
Parses which type of group it is for various common special cases to handle
src/parsing.rs:1188
↓ 3 callersFunctionparse_type_choices
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, name: &RustIdent, type_choice
src/parsing.rs:223
↓ 3 callersFunctionprobeEmissions
(id: string, example: string)
cddl-matrix/verify.ts:646
↓ 3 callersFunctionpushEmissionLines
(emission?: Record<string, EmissionOutcome>)
cddl-matrix/verify.ts:1387
↓ 3 callersFunctionreconcile
(dir: string, rows: Ex[], label: string)
cddl-matrix/project_robustness.ts:148
↓ 3 callersFunctionrecord_ctor_can_fail
Mirrors the record constructor's fallibility rule (`generation.rs` `new_can_fail`): `new()` returns `Result` iff any non-optional field is bounded.
src/emit_tests.rs:609
↓ 3 callersFunctionrecord_ctor_fields
The constructor field list (mirrors `codegen_struct`): mandatory, non-fixed, non-default.
src/emit_tests_wasm.rs:827
↓ 3 callersFunctionreplayInDir
(outDir: string, vecs: ReplayVec[], decodeType: string)
cddl-matrix/verify.ts:849
↓ 3 callersFunctionroundtrip_body
The shared wire-cycle emission for a list of `(value_expr, label)` cases. `conf` is the source CDDL rule name for the `--emit-tests-conformance` oracl
src/emit_tests.rs:521
↓ 3 callersFunctionrust_scoped
`cddl_lib::`-scoped rust value expression (the independent twin for the byte differential). Mirrors `emit_tests::render_rust` but scope-qualifies ever
src/emit_tests_wasm.rs:162
↓ 3 callersFunctionrust_type_from_type2
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, type2: &Type2, cli: &Cli, )
src/parsing.rs:1616
↓ 3 callersFunctionsample_ops
A representative rust-ish changeset built by hand (no template/disk needed).
src/cargo_manifest.rs:624
↓ 3 callersMethodserialize
(&self, serializer: S)
static/ordered_hash_map_json.rs:4
↓ 3 callersFunctionshortProbe
(id: string)
cddl-matrix/project_corpus.ts:234
↓ 3 callersFunctionsplitlines
(t: string)
cddl-matrix/verify.ts:215
↓ 3 callersFunctionsplitlines
(s: string)
cddl-matrix/query_q5_completeness.ts:52
↓ 3 callersFunctionstripComment
(s: string)
cddl-matrix/verify.ts:318
↓ 3 callersFunctionstripComment
(s: string)
cddl-matrix/query_q5_completeness.ts:92
↓ 3 callersFunctionsz_max
(sz: cbor_event::Sz)
tests/extern-dep-crate/src/serialization.rs:92
↓ 3 callersFunctiontag_literal
Extract the literal tag number cddl-codegen needs. The cddl AST models a tag as a `TagConstraint` (RFC 9682 allows type-valued `#6.<type>(...)` heads)
src/parsing.rs:216
↓ 3 callersFunctiontoCamelCase
(ident: string)
cddl-matrix/verify.ts:736
↓ 3 callersMethodto_canonical_cbor_bytes
(&self)
static/serialization_preserve_force_canonical.rs:57
↓ 3 callersFunctionvalidateBoth
(spec: string, hex: string)
cddl-matrix/verify.ts:891
↓ 3 callersFunctionversion_stamp
The write-only version stamp: `package.metadata.cddl-codegen.generated-with = <tool version>`. The tool NEVER reads this back — reading would make out
src/cargo_manifest.rs:396
↓ 3 callersMethodvisit_types_excluding
( &self, types: &IntermediateTypes, f: &mut F, already_visited: &mut BTreeSet<
src/intermediate.rs:2295
↓ 3 callersFunctionwasm_choice_value
Build a choice variant through `new_<variant>` from a `Choice` mint value.
src/emit_tests_wasm.rs:342
↓ 3 callersMethodwasm_lib
Scope header above the rest of the "lib" WASM scope. This is useful for when there is no explicit scope e.g. implicit types like arrays/tables (for WA
src/generation.rs:1687
↓ 3 callersMethodwrap_in_block
dumps self.content into {block} then uses {block} as our new content
src/generation.rs:392
↓ 2 callersFunctionaccept_assert
Boundary-acceptance assertion: the bounded wasm ctor accepts its exact boundary value.
src/emit_tests_wasm.rs:816
↓ 2 callersFunctionaccept_cases
The ACCEPTED-boundary cases only (the host-safe half of `bound_cases`).
src/emit_tests_wasm.rs:803
↓ 2 callersFunctionaddDef
(cur)
static/run-json2ts.js:37
↓ 2 callersFunctionadd_wasm_enum_getters
( s_impl: &mut codegen::Impl, types: &IntermediateTypes<'_>, name: &RustIdent, variants: &[Enu
src/generation.rs:7114
↓ 2 callersMethodafter_str
(&self, is_result: bool)
src/generation.rs:469
↓ 2 callersFunctionanchor
(n: Note)
cddl-matrix/project_corpus.ts:235
↓ 2 callersFunctionappend_raw_bytes_defs
Append the in-repo user-supplied `RawBytesEncoding` defs (`PubKey`) into a freshly generated crate rooted at `out` (rust + wasm), so a `rawbytes__*` w
src/tests/integration_tests.rs:476
↓ 2 callersFunctionastRoles
(args: string[], stdin?: string)
cddl-matrix/corpus_detect.ts:284
↓ 2 callersFunctionbeInt
(from: number, to: number)
cddl-matrix/project_golden_hex.ts:96
↓ 2 callersFunctionbounded_scalar
Is `ty` a bounded SCALAR (integer / text / bytes) we can push past its boundary with a literal? Array/map length bounds need a wasm collection build (
src/emit_tests_wasm.rs:851
↓ 2 callersMethodcanonical_ordering
(&'a self)
src/intermediate.rs:3197
↓ 2 callersFunctioncborItems
(b: Uint8Array, label: string)
cddl-matrix/project_golden_hex.ts:92
↓ 2 callersMethodcbor_encodings
CBOR encoding scope for `ident` (i.e. *Encoding structs)
src/generation.rs:1692
↓ 2 callersFunctioncbor_event_len_n
(n: &str, cli: &Cli)
src/generation.rs:7228
↓ 2 callersFunctioncbor_type_code_str
(cbor_type: cbor_event::Type)
src/utils.rs:3
↓ 2 callersMethodcbor_types_inner
Gets the next CBOR type after the passed in rep (array/map) tag Returns None if this is not possible and brute-force deserialization trying every vari
src/intermediate.rs:2472
↓ 2 callersFunctioncddl_oracle_rooted
(spec: &str, root_rule: &str)
tests/deser_test_conformance.rs:40
↓ 2 callersFunctioncddl_paths
( output: &mut Vec<std::path::PathBuf>, cd: &std::path::PathBuf, )
src/api.rs:18
↓ 2 callersFunctioncellId
(b: number)
cddl-matrix/project_golden_hex.ts:57
↓ 2 callersFunctionchoice_construct_reject
construct-reject for type/group choice variants whose constructor checks bounds.
src/emit_tests.rs:906
↓ 2 callersFunctionchoice_roundtrip
Choice round-trip: one wire cycle per constructible variant (the construct-reject half never serializes, so this is the variants' first trip through t
src/emit_tests.rs:697
↓ 2 callersFunctionclassify_sign_arm
Project a value window onto one CBOR sign arm. Distinguishes "vacuous in this arm" (drop the bound) from "this arm's whole sign domain is excluded" (u
src/generation.rs:4090
↓ 2 callersFunctioncodegen_table_type
( gen_scope: &mut GenerationScope, types: &IntermediateTypes, name: &RustIdent, key_type: Rust
src/generation.rs:4884
↓ 2 callersFunctioncoreOf
(evidence: string)
cddl-matrix/query_q4_directional.ts:196
↓ 2 callersFunctioncrateHasDeserialize
(outDir: string, typeName: string)
cddl-matrix/verify.ts:833
↓ 2 callersFunctioncreate_base_rust_struct
( types: &IntermediateTypes<'_>, ident: &RustIdent, manual_json_impl: bool, cli: &Cli, )
src/generation.rs:4268
↓ 2 callersFunctioncreate_deserialize_impls
( ident: &RustIdent, rep: Option<Representation>, tag: Option<usize>, len_info: Option<RustStr
src/generation.rs:4745
↓ 2 callersFunctioncreate_serialize_impls
( ident: &RustIdent, rep: Option<Representation>, tag: Option<usize>, definite_len: &str,
src/generation.rs:4545
↓ 2 callersFunctioncreate_variants_from_type_choices
TODO: Also generates individual choices if required, ie for a / [foo] / c would generate Foos
src/parsing.rs:1072
↓ 2 callersFunctiondeclare_modules
( gen_scopes: &mut BTreeMap<ModuleScope, codegen::Scope>, module_scopes: &[ModuleScope], )
src/generation.rs:4157
↓ 2 callersFunctiondecode_replay_generate
Generate a crate from `spec` into `out` (default flags unless `extra` adds e.g. `--preserve-encodings=true`), no `--wasm`, no `--emit-tests` — replay
src/tests/integration_tests.rs:4545
↓ 2 callersFunctiondecode_replay_run
Append the `__foreign_decode_replay` module (one `#[test]` per vector) to the generated lib.rs and `cargo test` it under the shared scratch target, re
src/tests/integration_tests.rs:4573
↓ 2 callersMethoddefault
()
src/generation.rs:501
↓ 2 callersMethoddefinite_info
See comment in RustStruct::definite_info(), this is the same, returns a string expression which evaluates to the length. self_expr is an expression th
src/intermediate.rs:1512
↓ 2 callersFunctiondep_feature_names
The feature names of a dep spec (empty for a plain string or a spec with no `features` array).
src/cargo_manifest.rs:221
↓ 2 callersFunctiondep_version
The version field of a dep spec: the string itself for a plain-string shorthand (`"1.0"` is `{ version = "1.0" }`), else the `version` key of a table-
src/cargo_manifest.rs:210
↓ 2 callersFunctionderiveDecode
(id: string, evidence: string, roundTrip: string)
cddl-matrix/query_q4_directional.ts:163
↓ 2 callersFunctionderiveRoundTrip
(ev: string)
cddl-matrix/query_q4_directional.ts:147
↓ 2 callersFunctionemit_item
(out: &mut Vec<u8>, item: &Item, cfg: &Cfg)
static/emit_tests_encoding_fidelity.rs:209
↓ 2 callersFunctionempty_everything
Minimal everything decoded from hand-written outer CBOR structure: [foo, external_foo, [], {}, baz, qux]. Also the only profile-agnostic way to mint a
tests/multifile/tests.rs:60
← previousnext →201–300 of 1,061, ranked by callers