1{%- import "struct_macros.tmpl" as struct_macros %} 2{%- set mojom_type = struct|get_qualified_name_for_kind %} 3 4// static 5bool StructTraits<{{mojom_type}}, {{mojom_type}}Ptr>::Read( 6 {{mojom_type}}DataView input, 7 {{mojom_type}}Ptr* output) { 8 bool success = true; 9 {{mojom_type}}Ptr result({{mojom_type}}::New()); 10 {{struct_macros.deserialize(struct, "input", "result->%s", 11 "success")|indent(4)}} 12 *output = std::move(result); 13 return success; 14} 15