MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / deserialize_optional_generic

Function deserialize_optional_generic

src/lowertest/src/lib.rs:81–94  ·  view source on GitHub ↗

Simpler interface for [deserialize_optional] when no syntax overrides or extensions are needed.

(
    stream_iter: &mut I,
    type_name: &'static str,
)

Source from the content-addressed store, hash-verified

79
80/// Simpler interface for [deserialize_optional] when no syntax overrides or extensions are needed.
81pub fn deserialize_optional_generic<D, I>(
82 stream_iter: &mut I,
83 type_name: &'static str,
84) -> Result<Option<D>, String>
85where
86 D: DeserializeOwned + MzReflect,
87 I: Iterator<Item = TokenTree>,
88{
89 deserialize_optional(
90 stream_iter,
91 type_name,
92 &mut GenericTestDeserializeContext::default(),
93 )
94}
95
96/// If the `stream_iter` is not empty, deserialize the next `TokenTree` into a `D`.
97///

Callers 4

create_test_enumFunction · 0.85
build_literal_if_ableMethod · 0.85
build_rowFunction · 0.85

Calls 1

deserialize_optionalFunction · 0.85

Tested by 2

create_test_enumFunction · 0.68
build_rowFunction · 0.68