fidl_data_zither_resources/
resources.rs

1// Copyright 2022 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// DO NOT EDIT.
6// Generated from FIDL library `zither.resources` by zither, a Fuchsia platform tool.
7
8#![allow(unused_imports)]
9
10use zerocopy::{FromBytes, IntoBytes};
11
12#[repr(u32)]
13#[derive(Clone, Copy, Debug, Eq, IntoBytes, PartialEq)]
14pub enum Subtype {
15    A = 0,
16    B = 1,
17}
18
19impl Subtype {
20    pub fn from_raw(raw: u32) -> Option<Self> {
21        match raw {
22            0 => Some(Self::A),
23
24            1 => Some(Self::B),
25
26            _ => None,
27        }
28    }
29}
30
31/// This is a handle.
32pub type Handle = u32;
33
34#[repr(C)]
35#[derive(Clone, Copy, Debug, Eq, FromBytes, IntoBytes, PartialEq)]
36pub struct StructWithHandleMembers {
37    pub untyped_handle: Handle,
38    pub handle_a: Handle,
39    pub handle_b: Handle,
40}