fidl_data_zither_resources/
resources.rs1#![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
31pub 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}