razor_libnvpair_sys/
lib.rs1#![allow(non_camel_case_types)]
2#![allow(non_snake_case)]
3#![allow(deref_nullptr)]
4
5include!(concat!(env!("OUT_DIR"), "/nvpair.rs"));
10
11impl From<boolean_t> for bool {
12 fn from(value: boolean_t) -> Self {
13 match value {
14 boolean_t::B_FALSE => false,
15 boolean_t::B_TRUE => true,
16 }
17 }
18}
19
20impl From<&boolean_t> for bool {
21 fn from(value: &boolean_t) -> Self {
22 match value {
23 boolean_t::B_FALSE => false,
24 boolean_t::B_TRUE => true,
25 }
26 }
27}
28
29impl From<bool> for boolean_t {
30 fn from(value: bool) -> Self {
31 match value {
32 false => boolean_t::B_FALSE,
33 true => boolean_t::B_TRUE,
34 }
35 }
36}
37
38impl From<&bool> for boolean_t {
39 fn from(value: &bool) -> Self {
40 match value {
41 false => boolean_t::B_FALSE,
42 true => boolean_t::B_TRUE,
43 }
44 }
45}