blob: e4811bf86dd7c2f16574f79a91204ae46dbc7226 [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.
package templates
const SourceFile = `
{{- define "GenerateSourceFile" -}}
// WARNING: This file is machine generated by fidlgen.
#![feature(futures_api, pin, arbitrary_self_types, nll)]
#![allow(warnings)]
extern crate fuchsia_async;
extern crate fuchsia_zircon as zx;
#[macro_use]
extern crate fidl;
#[macro_use]
extern crate futures;
{{ range $crate := .ExternCrates -}}
extern crate {{ $crate }};
{{ end -}}
use fidl::encoding::{Encodable, Decodable};
use futures::{Future, Stream, StreamExt};
use std::ops::Deref;
{{ range $const := .Consts -}}
{{ template "ConstDeclaration" $const }}
{{ end -}}
{{ range $enum := .Enums -}}
{{ template "EnumDeclaration" $enum }}
{{ end -}}
{{ range $union := .Unions -}}
{{ template "UnionDeclaration" $union }}
{{ end -}}
{{ range $struct := .Structs -}}
{{ template "StructDeclaration" $struct }}
{{ end -}}
{{ range $table := .Tables -}}
{{ template "TableDeclaration" $table }}
{{ end -}}
{{ range $interface := .Interfaces -}}
{{ template "InterfaceDeclaration" $interface }}
{{ end -}}
{{- end -}}
`