fidl_data_zither_aliases/
aliases.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Copyright 2022 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.

// DO NOT EDIT.
// Generated from FIDL library `zither.aliases` by zither, a Fuchsia platform tool.

#![allow(unused_imports)]

use zerocopy::{FromBytes, IntoBytes};

pub type BoolAlias = bool;

pub type Int8Alias = i8;

pub type Int16Alias = i16;

pub type Int32Alias = i32;

pub type Int64Alias = i64;

pub type Uint8Alias = u8;

pub type Uint16Alias = u16;

pub type Uint32Alias = u32;

pub type Uint64Alias = u64;

/// TODO(https://fxbug.dev/42057022): The IR currently does not propagate enough
/// information for bindings to express this type as an alias.
pub const CONST_FROM_ALIAS: u8 = 0xff;

#[repr(i16)]
#[derive(Clone, Copy, Debug, Eq, IntoBytes, PartialEq)]
pub enum Enum {
    Member = 0,
}

pub type EnumAlias = Enum;

#[repr(u16)]
#[derive(Clone, Copy, Debug, Eq, IntoBytes, PartialEq)]
pub enum Bits {
    One = 1,
}

pub type BitsAlias = Bits;

#[repr(C)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct Struct {
    pub x: u64,
    pub y: u64,
    pub e: EnumAlias,
}

pub type StructAlias = Struct;

pub type ArrayAlias = [u32; 4];

pub type NestedArrayAlias = [[Struct; 8]; 4];

/// Alias with a one-line comment.
pub type AliasWithOneLineComment = bool;

/// Alias
///     with
///         a
///           many-line
///             comment.
pub type AliasWithManyLineComment = u8;