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
use bitflags::bitflags;
use glib::translate::*;
use std::fmt;
bitflags! {
#[doc(alias = "JSCValuePropertyFlags")]
pub struct ValuePropertyFlags: u32 {
#[doc(alias = "JSC_VALUE_PROPERTY_CONFIGURABLE")]
const CONFIGURABLE = ffi::JSC_VALUE_PROPERTY_CONFIGURABLE as u32;
#[doc(alias = "JSC_VALUE_PROPERTY_ENUMERABLE")]
const ENUMERABLE = ffi::JSC_VALUE_PROPERTY_ENUMERABLE as u32;
#[doc(alias = "JSC_VALUE_PROPERTY_WRITABLE")]
const WRITABLE = ffi::JSC_VALUE_PROPERTY_WRITABLE as u32;
}
}
impl fmt::Display for ValuePropertyFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for ValuePropertyFlags {
type GlibType = ffi::JSCValuePropertyFlags;
fn into_glib(self) -> ffi::JSCValuePropertyFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::JSCValuePropertyFlags> for ValuePropertyFlags {
unsafe fn from_glib(value: ffi::JSCValuePropertyFlags) -> Self {
Self::from_bits_truncate(value)
}
}