Debian Codegraph @

third_party/rust/libudev/src/lib.rs

raw
1 extern crate libudev_sys as ffi;
2 extern crate libc;
3
4 pub use context::{Context};
5 pub use device::{Device,Properties,Property,Attributes,Attribute};
6 pub use enumerator::{Enumerator,Devices};
7 pub use error::{Result,Error,ErrorKind};
8 pub use monitor::{Monitor,MonitorSocket,EventType,Event};
9
10 macro_rules! try_alloc {
11 ($exp:expr) => {{
12 let ptr = $exp;
13
14 if ptr.is_null() {
15 return Err(::error::from_errno(::libc::ENOMEM));
16 }
17
18 ptr
19 }}
20 }
21
22 mod context;
23 mod device;
24 mod enumerator;
25 mod error;
26 mod monitor;
27
28 mod handle;
29 mod util;