+#[no_mangle]
+/// Utility method to constructs a new Trace-variant Level
+pub extern "C" fn Level_trace() -> Level {
+ Level::Trace}
+#[no_mangle]
+/// Utility method to constructs a new Debug-variant Level
+pub extern "C" fn Level_debug() -> Level {
+ Level::Debug}
+#[no_mangle]
+/// Utility method to constructs a new Info-variant Level
+pub extern "C" fn Level_info() -> Level {
+ Level::Info}
+#[no_mangle]
+/// Utility method to constructs a new Warn-variant Level
+pub extern "C" fn Level_warn() -> Level {
+ Level::Warn}
+#[no_mangle]
+/// Utility method to constructs a new Error-variant Level
+pub extern "C" fn Level_error() -> Level {
+ Level::Error}
+/// Checks if two Levels contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+#[no_mangle]
+pub extern "C" fn Level_eq(a: &Level, b: &Level) -> bool {
+ if &a.to_native() == &b.to_native() { true } else { false }
+}
+/// Checks if two Levels contain equal inner contents.
+#[no_mangle]
+pub extern "C" fn Level_hash(o: &Level) -> u64 {
+ // Note that we'd love to use std::collections::hash_map::DefaultHasher but it's not in core
+ #[allow(deprecated)]
+ let mut hasher = core::hash::SipHasher::new();
+ std::hash::Hash::hash(&o.to_native(), &mut hasher);
+ std::hash::Hasher::finish(&hasher)
+}