summaryrefslogtreecommitdiffstats
path: root/third_party/rust/libudev/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/libudev/src/lib.rs')
-rw-r--r--third_party/rust/libudev/src/lib.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/third_party/rust/libudev/src/lib.rs b/third_party/rust/libudev/src/lib.rs
new file mode 100644
index 0000000000..ac6be5c169
--- /dev/null
+++ b/third_party/rust/libudev/src/lib.rs
@@ -0,0 +1,29 @@
+extern crate libudev_sys as ffi;
+extern crate libc;
+
+pub use context::{Context};
+pub use device::{Device,Properties,Property,Attributes,Attribute};
+pub use enumerator::{Enumerator,Devices};
+pub use error::{Result,Error,ErrorKind};
+pub use monitor::{Monitor,MonitorSocket,EventType,Event};
+
+macro_rules! try_alloc {
+ ($exp:expr) => {{
+ let ptr = $exp;
+
+ if ptr.is_null() {
+ return Err(::error::from_errno(::libc::ENOMEM));
+ }
+
+ ptr
+ }}
+}
+
+mod context;
+mod device;
+mod enumerator;
+mod error;
+mod monitor;
+
+mod handle;
+mod util;