MCPcopy Create free account

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

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

↓ 472 callersMethodpush
(mut self, gen_scope: &mut GenerationScope, types: &IntermediateTypes)
src/generation.rs:4330
↓ 371 callersMethodline
(&mut self, line: &str)
src/generation.rs:4221
↓ 106 callersMethodpush_block
(&mut self, block: Block)
src/generation.rs:4225
↓ 88 callersFunctiondeser_test
(orig: &T)
tests/core/tests.rs:15
↓ 86 callersMethodas_ref
(&self)
src/intermediate.rs:1254
↓ 86 callersFunctiono
(s = "")
cddl-matrix/project_corpus.ts:281
↓ 69 callersMethodto_cbor_bytes
(&self)
tests/extern-dep-crate/src/lib.rs:31
↓ 58 callersFunctionw
(s = "")
cddl-matrix/project_golden_hex.ts:248
↓ 43 callersFunctionw
(s = "")
cddl-matrix/project_corpus.ts:196
↓ 37 callersFunctiontool_cmd
Spawn cargo/wasm-pack for building a *generated* crate. The generated code is the harness's own output and legitimately over-imports; CI's `setup-rust
src/tests/integration_tests.rs:108
↓ 36 callersMethodis_fixed_value
(&self)
src/intermediate.rs:1792
↓ 36 callersMethodrec
(&mut self, kind: &str, name: Option<String>)
examples/ast_roles.rs:49
↓ 34 callersFunctionfeaturesIn
(cddl: string)
cddl-matrix/corpus_detect.ts:217
↓ 33 callersFunctionrun
(spec: &str, tag: &str)
src/tests/robustness_tests.rs:339
↓ 31 callersMethodas_bytes
(mut self)
src/intermediate.rs:1414
↓ 30 callersMethodresolve_alias_shallow
shallow resolve aliases. use this when you only need to strip direct aliases to check the type more easily e.g. to figure out if a ConceptualRustType
src/intermediate.rs:1720
↓ 24 callersFunctioncanonical
()
src/tests/integration_tests.rs:3566
↓ 24 callersMethodvariant
(&self)
src/intermediate.rs:2887
↓ 22 callersFunctionapply
Apply `ops` in order to `existing` (parsed if `Some`, else a fresh empty document) and serialize the result. Pure: no disk I/O, output is a function o
src/cargo_manifest.rs:84
↓ 22 callersMethoddirectly_wasm_exposable
(&self, types: &IntermediateTypes)
src/intermediate.rs:1727
↓ 22 callersMethodrust_struct
(&self, ident: &RustIdent)
src/intermediate.rs:546
↓ 22 callersMethodrust_type
Can only be used on RustType variants, panics otherwise. So don't call this when we're embedding the variant types
src/intermediate.rs:2554
↓ 21 callersFunctionencoding_fields
( types: &IntermediateTypes, name: &str, ty: &RustType, include_default: bool, cli: &Cli,
src/generation.rs:5145
↓ 21 callersFunctiongenerated_strings
( cli: &Cli, )
src/api.rs:247
↓ 21 callersFunctionrun_test
( dir: &str, options: &[&str], export_suffix: Option<&str>, external_rust_file_paths: &[std::p
src/tests/integration_tests.rs:501
↓ 20 callersMethodderive
(&mut self, derive: &str)
src/generation.rs:4257
↓ 18 callersFunctiondeser_test
(orig: &T)
tests/preserve-encodings/tests.rs:7
↓ 18 callersMethodgenerate_deserialize
( &mut self, types: &IntermediateTypes, serializing_rust_type: SerializingRustType,
src/generation.rs:2371
↓ 18 callersFunctiongenerate_to_disk
Run the full pipeline and write the generated crate(s) to `cli.output` (the CLI behaviour).
src/api.rs:230
↓ 17 callersMethodname_as_var
(&self)
src/intermediate.rs:2563
↓ 17 callersMethodpush_all
(&mut self, contents: BlocksOrLines)
src/generation.rs:4206
↓ 17 callersMethodresolve_aliases
deep resolve aliases
src/intermediate.rs:1420
↓ 17 callersFunctiontool_exists
(bin: &str)
src/tests/integration_tests.rs:95
↓ 16 callersMethodis_plain_group
(&self, name: &RustIdent)
src/intermediate.rs:833
↓ 16 callersMethodregister_rust_struct
this is called by register_table_type / register_array_type automatically
src/intermediate.rs:575
↓ 15 callersMethodadd_to_code
(self, target: &mut Self)
src/generation.rs:381
↓ 15 callersFunctiondeser_test
(orig: &T)
tests/rust-wasm-split/tests.rs:7
↓ 15 callersFunctionrender_rust
Render a `MintValue` as the rust-crate API expression string. This reproduces, byte-for-byte, the output the fused derive-and-format code produced bef
src/emit_tests.rs:155
↓ 13 callersMethodexpr_is_ref
(mut self, is_ref: bool)
src/generation.rs:72
↓ 13 callersMethodfor_rust_member
Type when storing a value inside of a rust struct. This is the underlying raw representation.
src/intermediate.rs:1956
↓ 13 callersMethodfor_wasm_param
Function parameter TYPE from wasm (i.e. ref for non-primitives, value for supported primitives)
src/intermediate.rs:1854
↓ 13 callersMethodregister_type_alias
(&mut self, alias: RustIdent, info: AliasInfo)
src/intermediate.rs:536
↓ 13 callersMethodrust_structs
(&self)
src/intermediate.rs:239
↓ 12 callersFunctionforeignTomlStr
(s: string)
cddl-matrix/verify.ts:729
↓ 12 callersMethodoptional_field
(mut self, is_optional: bool)
src/generation.rs:212
↓ 12 callersMethodrecord_rejection
Record a construct the parse walk rejects by design (it can't return an `Err` itself). `finalize` turns any accumulated rejections into a single grace
src/intermediate.rs:190
↓ 12 callersMethodtag
(mut self, tag: usize)
src/intermediate.rs:1378
↓ 12 callersMethodtag_if
(self, tag: Option<usize>)
src/intermediate.rs:1383
↓ 11 callersFunctionbounds_check_if_block
( bounds: &(Option<i128>, Option<i128>), e: &str, return_err: bool, )
src/generation.rs:4042
↓ 11 callersMethodcustom_deserialize
(mut self, func: String)
src/generation.rs:231
↓ 11 callersMethodis_end
(mut self, is_end: bool)
src/generation.rs:78
↓ 11 callersFunctiontomlStr
(s: string)
cddl-matrix/verify.ts:1322
↓ 11 callersFunctionwrite_using_sz
( body: &mut dyn CodeBlock, func: &str, serializer_use: &str, expr: &str, fit_sz_expr: &st
src/generation.rs:3923
↓ 10 callersMethodadd_to
(self, body: &mut T)
src/generation.rs:374
↓ 10 callersFunctioncheck
(obj, label)
tests/wasm_json/roundtrip.mjs:18
↓ 10 callersFunctiondep
A `[dependencies]` entry emitted set-or-remove: `Set(spec)` when `enabled`, else `Remove`.
src/cargo_manifest.rs:384
↓ 10 callersFunctiondeser_test
(orig: &T)
tests/comment-dsl/tests.rs:11
↓ 10 callersMethodexport
Exports all already-generated state to the provided directory. Call generate() first to populate the generation state.
src/generation.rs:1256
↓ 10 callersFunctionfold_log
Read an append-only change log (already lib-name-substituted) and fold it into ordered ops. Each `[[change]]` has an `id` (must be contiguous from 1),
src/cargo_manifest.rs:416
↓ 10 callersMethodin_embedded
(mut self, in_embedded: bool)
src/generation.rs:207
↓ 10 callersMethodis_enum
mostly for convenience since this is checked in so many places
src/intermediate.rs:564
↓ 10 callersFunctionmerged_dep
Apply a single `dependencies.<name>` Set to `existing` and return the merged entry's rendered line (`name = ...`), for tight assertions on the merge o
src/cargo_manifest.rs:800
↓ 10 callersFunctionrunExit
(cmd: string[], cwd?: string, env?: Record<string, string>, timeoutS = PROBE_TIMEOUT)
cddl-matrix/verify.ts:427
↓ 10 callersFunctionrunProbe
(cmd: string[], cwd?: string, env?: Record<string, string>, timeoutS = PROBE_TIMEOUT)
cddl-matrix/verify.ts:442
↓ 10 callersMethodrust_lib
Scope header above the rest of the "lib" rust scope. This is useful for when there is no explicit scope e.g. implicit types like arrays/tables (for WA
src/generation.rs:1657
↓ 10 callersFunctionrustfmt_generated_string
Runs rustfmt on the string
src/generation.rs:9470
↓ 10 callersMethodscope
(&self, ident: &RustIdent)
src/intermediate.rs:856
↓ 10 callersFunctionvalid_value
A valid in-range minted value for `ty`, or `None` if it can't be cheaply minted.
src/emit_tests.rs:1129
↓ 10 callersMethodwasm
Generates in the appropriate scope for `ident` Used for all the generated WASM wrapper structs and associated traits
src/generation.rs:1679
↓ 9 callersMethodcbor_types
All POSSIBLE outermost CBOR types this can encode to
src/intermediate.rs:1115
↓ 9 callersMethodconfig
(&self)
src/intermediate.rs:2883
↓ 9 callersMethodencoding_var_is_ref
(mut self, is_ref: bool)
src/generation.rs:83
↓ 9 callersMethodfor_wasm_return
Return TYPE for wasm
src/intermediate.rs:1906
↓ 9 callersMethodis_copy
if it impements the Copy trait in rust
src/intermediate.rs:2232
↓ 9 callersMethodrust
Generates in the appropriate scope for `ident` Used for all the generated structs and associated traits (besides serialization ones)
src/generation.rs:1649
↓ 9 callersFunctionrust_type_from_type1
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, type1: &Type1, cli: &Cli, )
src/parsing.rs:1578
↓ 9 callersMethodsource_rule_name
The exact CDDL source rule name `ident` was registered under (e.g. `my-rule`, which `RustIdent` camel-cases to `MyRule`, indistinguishable from `my_ru
src/intermediate.rs:870
↓ 8 callersFunctiondeser_test
(orig: &T)
tests/multifile/tests.rs:21
↓ 8 callersFunctionencoding_var_names_str
( types: &IntermediateTypes, field_name: &str, rust_type: &RustType, cli: &Cli, )
src/generation.rs:5399
↓ 8 callersMethodexpanded_field_count
CBOR len count for the entire type if it were embedded as a member in a cbor collection (array/map)
src/intermediate.rs:1482
↓ 8 callersFunctionmatch
(s: string)
cddl-matrix/query_q5_completeness.ts:229
↓ 8 callersFunctionmeasure_kind
How `ty`'s bound is measured, or `None` if it isn't a cheaply-testable bounded shape (`nint`/bool/float values are excluded — see module docs).
src/emit_tests.rs:1019
↓ 8 callersFunctionmerge_metadata
(r1: &RuleMetadata, r2: &RuleMetadata)
src/comment_ast.rs:37
↓ 8 callersMethodnew_type
note: this is mut so that apply_type_aliases() can mark which reserved idents are in the CDDL prelude so we don't generate code for all of them, poten
src/intermediate.rs:460
↓ 8 callersFunctionok
(exit: number)
cddl-matrix/verify.ts:1321
↓ 8 callersFunctionpin
(reason: string)
cddl-matrix/verify.ts:930
↓ 8 callersFunctiontype2_is_null
would use rust_type_from_type1 but that requires IntermediateTypes which we shouldn't
src/parsing.rs:1346
↓ 8 callersFunctiontype2_to_number_literal
(type2: &Type2)
src/parsing.rs:303
↓ 7 callersFunctiondie
(msg: string)
cddl-matrix/project_golden_hex.ts:94
↓ 7 callersMethodgenerate_serialize
( &mut self, types: &IntermediateTypes, serializing_rust_type: SerializingRustType<'_>
src/generation.rs:1703
↓ 7 callersFunctionmake_foo
(index_0: u64)
tests/multifile/tests.rs:31
↓ 7 callersFunctionmetadata_from_comments
(comments: &[&str])
src/comment_ast.rs:232
↓ 7 callersFunctionrange_to_primitive
(low: Option<i128>, high: Option<i128>, primitive: Primitive)
src/parsing.rs:514
↓ 7 callersMethodtype_aliases
(&self)
src/intermediate.rs:235
↓ 7 callersFunctionvalid_value_at
(types: &IntermediateTypes, ty: &RustType, depth: u8)
src/emit_tests.rs:1133
↓ 7 callersFunctionvariant_arg_fields
The constructor arg list of a choice variant's `new_<variant>` (mirrors `generate_enum`), or `None` when it isn't cheaply constructible (inlined recor
src/emit_tests.rs:1448
↓ 7 callersFunctionwrite_string_sz
( body: &mut dyn CodeBlock, func: &str, serializer_use: &str, expr: &str, expr_is_ref: boo
src/generation.rs:3950
↓ 6 callersMethodannotate
This MUST have self.content be a Result, as if you were going to wrap it in an error annotation lambda block. If possible this will avoid the need for
src/generation.rs:401
↓ 6 callersMethodas_single_line
(&self)
src/generation.rs:4184
↓ 6 callersFunctioncbor_round_trip
(orig: &T)
tests/nullable-wasm/tests.rs:13
next →1–100 of 1,061, ranked by callers