MCPcopy Create free account
hub / github.com/dcSpark/cddl-codegen / empty_collection

Function empty_collection

src/emit_tests.rs:1331–1340  ·  view source on GitHub ↗

An empty value expression for a collection `ty` (valid for a 0-lower-bound `*`-occurrence). `Default::default()` covers every collection representation an inline map field can take (`BTreeMap`, or the preserve-encodings `OrderedHashMap`, both `Default`), inferred from the constructor-argument position; `vec![]` is the clearer form for arrays.

(ty: &RustType)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

valid_value_atFunction · 0.85

Calls 1

resolve_alias_shallowMethod · 0.80

Tested by

no test coverage detected