blob: 591341a03dd1a2dfc75a1c1d5113c1c1f06e45a8 [file] [log] [blame]
// Copyright 2021 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.
library banjo.examples.references;
type SomeType = struct {
value uint32;
};
type VectorFieldInStruct = struct {
@out_of_line_contents
the_vector vector<SomeType>;
the_other_vector vector<box<SomeType>>;
@mutable
the_mutable_vector vector<SomeType>;
@mutable
the_mutable_vector_of_boxes vector<box<SomeType>>;
the_default_vector vector<SomeType>;
};
type MutableField = struct {
@mutable
some_string string;
some_other_string string:optional;
some_default_string string;
};
@transport("Banjo")
protocol InOutProtocol {
DoSomething(struct {
@in_out
param SomeType;
}) -> ();
DoSomeOtherThing(struct {
param box<SomeType>;
}) -> ();
DoSomeDefaultThing(struct {
param SomeType;
}) -> ();
};