blob: a7fda92511309677e154c0ced5c723326992d433 [file] [log] [blame]
{{/*
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
*/}}
{{- define "StructDefinition" -}}
{{- $struct := . }}
{{ range $comment := $struct.DocComments }}
//{{ $comment }}
{{- end }}
type {{ $struct.Name }} struct {
_ struct{} `{{ $struct.Tags }}`
{{- range $memb := $struct.Members }}
{{- range $comment := $memb.DocComments }}
//{{ $comment }}
{{- end }}
{{ $memb.Name }} {{ $memb.Type }} `{{ $memb.Tags }}`
{{- end }}
}
var _m{{ $struct.Name }} = _bindings.CreateLazyMarshaler({{ $struct.Name }}{})
func (msg *{{ $struct.Name }}) Marshaler() _bindings.Marshaler {
return _m{{ $struct.Name }}
}
{{- end -}}