forked from google/crubit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_generated.rs
More file actions
37 lines (34 loc) · 1.07 KB
/
example_generated.rs
File metadata and controls
37 lines (34 loc) · 1.07 KB
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
// Part of the Crubit project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Automatically @generated Rust bindings for the following C++ target:
// //examples/cpp/enum:example_lib
// Features: supported
#![rustfmt::skip]
#![feature(custom_inner_attributes, register_tool)]
#![allow(stable_features)]
#![no_std]
#![register_tool(__crubit)]
#![allow(improper_ctypes)]
#![allow(nonstandard_style)]
#![allow(dead_code)]
#![deny(warnings)]
#[repr(transparent)]
#[derive(Debug, PartialEq, Eq, Copy, Clone, Hash, PartialOrd, Ord)]
#[__crubit::annotate(cpp_type = "Color")]
pub struct Color(::core::ffi::c_uint);
impl Color {
pub const kRed: Color = Color(0);
pub const kBlue: Color = Color(1);
pub const kGreen: Color = Color(2);
}
impl From<::core::ffi::c_uint> for Color {
fn from(value: ::core::ffi::c_uint) -> Color {
Color(value)
}
}
impl From<Color> for ::core::ffi::c_uint {
fn from(value: Color) -> ::core::ffi::c_uint {
value.0
}
}