blob: 32a8ca46784e5dee2a06360f40e0da6e4faac049 [file] [log] [blame]
// Copyright 2019 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.
package templates
const Result = `
{{- define "ResultDeclaration" }}
pub type {{ .Name }} = std::result::Result< (
{{- if gt (len .Ok) 1 }}
{{- range $ok_member_type := .Ok }}
{{ $ok_member_type }},
{{- end }}
{{- else }}
{{- range $ok_member_type := .Ok }}
{{ $ok_member_type }}
{{- end }}
{{- end }}
), {{ .ErrType }} >;
{{- end }}
`