MCPcopy Create free account

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

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

↓ 6 callersFunctioncli_for
Build a `Cli` for in-process generation. `--output` is unused (`generated_strings` does no disk I/O) but clap requires it; `--static-dir` defaults to
src/tests/snapshot_tests.rs:38
↓ 6 callersFunctioncombine_comments
(a: &'a Option<Comments>, b: &'a Option<Comments>)
src/parsing.rs:1410
↓ 6 callersFunctionemit_head
Emit a head for `major` carrying `arg`, at the width `w` selects (minimal, one step wider, or straight to 8-byte; a head already at 8 bytes is left al
static/emit_tests_encoding_fidelity.rs:153
↓ 6 callersFunctionend_len
( body: &mut dyn CodeBlock, serializer_use: &str, encoding_var: &str, is_end: bool, cli: &
src/generation.rs:3902
↓ 6 callersMethodexpr
(mut self, expr: S)
src/generation.rs:62
↓ 6 callersMethodfinalize
call this after all types have been registered
src/intermediate.rs:680
↓ 6 callersMethodgenerate_constructor
if init_fields exists, use these for values, otherwise assumes variables exist with same names
src/generation.rs:7431
↓ 6 callersFunctionget_comment_after
Gets the comment(s) that come after a type by parsing the CDDL AST (implementation detail) sometimes getting the comment after a type requires walkin
src/parsing.rs:2500
↓ 6 callersFunctionloadTomlArray
(rel: string, key: string)
cddl-matrix/lib.ts:38
↓ 6 callersFunctionlog
(note: string)
cddl-matrix/verify.ts:615
↓ 6 callersFunctionmake_deserialization_function
(name: &str, reader: &str, cli: &Cli)
src/generation.rs:8532
↓ 6 callersFunctionminicbor_next_item
(it: &mut minicbor::decode::Tokenizer<'_, '_>)
src/tests/integration_tests.rs:248
↓ 6 callersMethodname_as_wasm_array
(&self, types: &IntermediateTypes)
src/intermediate.rs:1800
↓ 6 callersFunctionre_encode
(input: &[u8], cfg: Cfg)
static/emit_tests_encoding_fidelity.rs:277
↓ 6 callersMethodrust_serialize
Serialization scope for `ident`
src/generation.rs:1662
↓ 6 callersFunctionrust_type
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, t: &Type, cli: &Cli, )
src/parsing.rs:1777
↓ 6 callersMethodset_rep_if_plain_group
see self.plain_groups comments
src/intermediate.rs:787
↓ 6 callersFunctionsz_max
(sz: cbor_event::Sz)
static/serialization_preserve.rs:70
↓ 6 callersFunctiontype_uses_custom_ser
( types: &IntermediateTypes, ty: &RustType, visited: &mut std::collections::BTreeSet<RustIdent>, )
src/emit_tests.rs:447
↓ 6 callersMethodused_as_key
(&self, name: &RustIdent)
src/intermediate.rs:892
↓ 6 callersFunctionwasm_arg
A single wasm ctor argument: the value expression prefixed with `&` when the wasm param is a ref (composite wrappers / wrapper collections), matching
src/emit_tests_wasm.rs:377
↓ 6 callersMethodwith_bounds
(self, mut bounds: (Option<i128>, Option<i128>))
src/intermediate.rs:1428
↓ 6 callersFunctionwith_thread_silenced_panics
Silence panic output from THIS test's thread for the duration of `f` (the deliberate `catch_unwind` probes would otherwise spew every expected panic).
src/tests/robustness_tests.rs:32
↓ 5 callersFunctionacquire_scratch_lock
(scratch_name: &str)
src/tests/integration_tests.rs:34
↓ 5 callersFunctionaxisOf
(id: string)
cddl-matrix/query_q1_gaps.ts:67
↓ 5 callersFunctionbounds_check_expr_rust_type
pub(crate): emit_tests mirrors ctor fallibility as `needs_bounds_check_if_inlined && this is Some`
src/generation.rs:4000
↓ 5 callersMethodcbor_len_info
(&self, types: &IntermediateTypes)
src/intermediate.rs:2976
↓ 5 callersFunctioncml_shaped_manifest
A user manifest shaped like cardano-multiplatform-lib's `[dependencies]` block — the deps whose user-shaped specs a whole-value `Set` used to flatten.
src/cargo_manifest.rs:787
↓ 5 callersFunctionconvert_to_camel_case
(ident: &str)
src/utils.rs:58
↓ 5 callersFunctioncount
(p: string)
cddl-matrix/query_q6_diff.ts:158
↓ 5 callersFunctioncreate_base_wasm_wrapper
default_structure will have it be a DIRECT wrapper with a tuple field of rust_lib::{ident} this will include generating to/from traits automatically
src/generation.rs:4489
↓ 5 callersMethodfor_rust_move
Function parameter TYPE that will be moved in
src/intermediate.rs:1818
↓ 5 callersFunctionkey_encoding_field
(name: &str, key: &FixedValue)
src/generation.rs:5121
↓ 5 callersFunctionkey_path
(segments: &[&str])
src/cargo_manifest.rs:379
↓ 5 callersFunctionloadMatrix
(path: string)
cddl-matrix/query_q6_diff.ts:46
↓ 5 callersFunctionlog
Assemble a change log from `(path, action)` pairs, numbering ids contiguously from 1.
src/cargo_manifest.rs:976
↓ 5 callersFunctionmake_serialization_function
(name: &str, writer: &str, cli: &Cli)
src/generation.rs:8510
↓ 5 callersFunctionmaterialize
Build a minted value for `ty` whose bound-relevant measure equals `measure` (the value itself for integers, the length for text/bytes/array/map).
src/emit_tests.rs:1344
↓ 5 callersFunctionminicbor_pull
( it: &mut minicbor::decode::Tokenizer<'_, 'b>, )
src/tests/integration_tests.rs:238
↓ 5 callersFunctionnint_bounds_to_u64
we store nint as its u64 magnitude `m = |v + 1| = -v - 1`, which is *decreasing* in the signed value `v`. So a value bound `vmin <= v <= vmax` maps to
src/generation.rs:4021
↓ 5 callersFunctionparse_control_operator
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, type2: &Type2, operator: &Ope
src/parsing.rs:336
↓ 5 callersMethodresolve
TODO: should we rename fields / variant names after-the-fact? (for the cases where the name came from the original generic param) returns None when it
src/intermediate.rs:3270
↓ 5 callersFunctionrun
(profile: &str, extra_flags: &[&str])
src/tests/integration_tests.rs:1872
↓ 5 callersFunctionrust_crate_struct_from_wasm
Formatted string for fully scoped rust crate struct for use from wasm crate
src/generation.rs:4289
↓ 5 callersFunctionsh
(cmd: string[], cwd = ROOT, env?: Record<string, string>)
check.ts:68
↓ 5 callersFunctionstart_len
( body: &mut dyn CodeBlock, rep: Representation, serializer_use: &str, encoding_var: &str,
src/generation.rs:3874
↓ 5 callersFunctionsurround_in_len_checks
( mut main_deser_code: DeserializationCode, len_info: RustStructCBORLen, rep: Representation,
src/generation.rs:7597
↓ 5 callersMethodto_wasm_boundary
FROM rust TO wasm (with cloning/wrapping) (for arguments)
src/intermediate.rs:2153
↓ 5 callersMethodvar_name
(mut self, var_name: S)
src/generation.rs:67
↓ 5 callersMethodvisit_type2
(&mut self, t2: &'b Type2<'a>)
examples/ast_roles.rs:133
↓ 5 callersMethodvisit_types
(&self, f: &mut F)
src/intermediate.rs:763
↓ 5 callersFunctionwith_types
Parse the CDDL input described by `cli`, build the intermediate representation, and invoke `f` with a borrow of it plus the `export_raw_bytes_encoding
src/api.rs:45
↓ 5 callersFunctionws
(s: string)
cddl-matrix/corpus_detect.ts:169
↓ 4 callersFunctionadd_struct_derives
( data_type: &mut T, used_in_key: bool, is_enum: bool, custom_json: bool, cli: &Cli, )
src/generation.rs:9133
↓ 4 callersMethodannotate
(self, location: T)
tests/extern-dep-crate/src/error.rs:66
↓ 4 callersFunctionarg_can_fail
Mirrors a choice-variant ctor's per-arg fallibility (`generation.rs` per-variant `can_fail`): an arg makes `new_<variant>` return `Result` only when i
src/emit_tests.rs:792
↓ 4 callersFunctionbound_cases
Boundary and just-beyond cases for a bounded type: `(value_expr, accept, label)`. Accept cases are the inclusive min/max boundaries (must round-trip /
src/emit_tests.rs:1094
↓ 4 callersMethodcan_new_fail
(&self, name: &RustIdent)
src/intermediate.rs:841
↓ 4 callersFunctioncanon_f64_bits
(f: f64)
src/tests/integration_tests.rs:175
↓ 4 callersFunctioncodegenVerdict
(p: CodegenProbe)
cddl-matrix/verify.ts:551
↓ 4 callersMethodcomponents
(&self)
src/intermediate.rs:41
↓ 4 callersMethodcontainer_encoding_lookup
for looking up encoding vars stored within a Vec<T> / Map<K, V> and declaring them as local variables
src/generation.rs:124
↓ 4 callersFunctionconvert_to_snake_case
(ident: &str)
src/utils.rs:16
↓ 4 callersFunctiondeser_test_canonical
(orig: &T)
tests/canonical/tests.rs:17
↓ 4 callersFunctiondeser_test_orig
(orig: &T)
tests/canonical/tests.rs:7
↓ 4 callersMethodencoding_var
(&self, child: Option<&str>, is_copy: bool)
src/generation.rs:108
↓ 4 callersMethodencoding_var_in_option_struct
(mut self, option_struct: S)
src/generation.rs:88
↓ 4 callersMethodencoding_var_no_option_struct
(mut self)
src/generation.rs:93
↓ 4 callersMethodexport_static_files
If someone override the common imports, we don't want to export them
src/cli.rs:134
↓ 4 callersFunctionfind_refs_generic_args
( refs: &mut Vec<&'a Identifier<'a>>, generic_arg: &'a Option<GenericArgs<'a>>, )
src/dep_graph.rs:147
↓ 4 callersFunctionfind_refs_group
(refs: &mut Vec<&'a Identifier<'a>>, group: &'a Group<'a>)
src/dep_graph.rs:120
↓ 4 callersFunctionfind_refs_type1
(refs: &mut Vec<&'a Identifier<'a>>, type1: &'a Type1<'a>)
src/dep_graph.rs:79
↓ 4 callersMethodfor_variant
(&self)
src/intermediate.rs:982
↓ 4 callersFunctionforeignGenCrate
(outDir: string, spec: string)
cddl-matrix/verify.ts:825
↓ 4 callersFunctionforeignIdent
(id: string)
cddl-matrix/verify.ts:731
↓ 4 callersMethodfrom
(failure: DeserializeFailure)
static/error.rs:143
↓ 4 callersMethodfrom_wasm_boundary_clone
( &self, types: &IntermediateTypes, expr: &str, can_fail: bool, )
src/intermediate.rs:2019
↓ 4 callersFunctioninlineExample
(ex: string | undefined)
cddl-matrix/query_q1_gaps.ts:79
↓ 4 callersFunctionjson_str
(s: &str)
examples/ast_roles.rs:365
↓ 4 callersFunctionmake_deser_loop
(len_var: &str, len_expr: &str, cli: &Cli)
src/generation.rs:4842
↓ 4 callersFunctionmake_serialization_impl
(name: &str, cli: &Cli)
src/generation.rs:8522
↓ 4 callersFunctionmarkerCount
(doc: string, marker: string)
cddl-matrix/query_q1_gaps.ts:242
↓ 4 callersFunctionmatch
(id: string)
cddl-matrix/query_q1_gaps.ts:319
↓ 4 callersFunctionparse_group
( types: &mut IntermediateTypes, parent_visitor: &ParentVisitor, group: &Group, name: &RustIde
src/parsing.rs:2254
↓ 4 callersFunctionreEsc
(s: string)
cddl-matrix/corpus_detect.ts:45
↓ 4 callersMethodto_embedded_rust_type
(&self)
src/intermediate.rs:2643
↓ 4 callersFunctionval
Infallible [`try_val`] for in-code op builders whose snippets are compile-time constants.
src/cargo_manifest.rs:375
↓ 4 callersFunctionvalid_measure
In-range measure for a valid baseline: the inclusive min (or max, or 0).
src/emit_tests.rs:1040
↓ 4 callersMethodvisit_group
(&mut self, g: &'b Group<'a>)
examples/ast_roles.rs:340
↓ 4 callersMethodvisit_type
(&mut self, t: &'b Type<'a>)
examples/ast_roles.rs:111
↓ 3 callersMethodadd_conversion_methods
native_name is &str since we need to possibly prepend namespacing and where we're calling it we'd have to construct a RustType where we didn't have to
src/generation.rs:4357
↓ 3 callersFunctionadd_deserialize_final_len_check
Adds final Len check if not fixed + reads for the ending Special::Break for Indefinite arrays
src/generation.rs:4682
↓ 3 callersFunctionadd_deserialize_initial_len_check
Adds a fixed length check if length is fixed, reads the mandatory amount if there are optional fields, or nothing for dynamic lengths
src/generation.rs:4644
↓ 3 callersFunctionappend_number_if_duplicate
(used_names: &mut BTreeMap<String, u32>, name: String)
src/utils.rs:191
↓ 3 callersFunctionargRequired
(id: string, tag: string)
cddl-matrix/corpus_detect.ts:170
↓ 3 callersFunctioncleanOut
()
cddl-matrix/verify.ts:479
↓ 3 callersFunctioncollectDivergences
(id: string, emission?: Record<string, EmissionOutcome>)
cddl-matrix/verify.ts:1481
↓ 3 callersFunctioncollectForeignFailure
(id: string, af?: boolean, fv?: number)
cddl-matrix/verify.ts:1509
↓ 3 callersFunctioncountAxis
(rows: Annotation[], axis: Axis)
cddl-matrix/query_q1_gaps.ts:156
↓ 3 callersFunctioncreate_base_wasm_struct
( gen_scope: &GenerationScope, ident: &'a RustIdent, exists_in_rust: bool, cli: &Cli, )
src/generation.rs:4395
← previousnext →101–200 of 1,061, ranked by callers