summaryrefslogtreecommitdiffstats
path: root/third_party/rust/libudev/src/lib.rs
blob: ac6be5c169f0d90473b26c6b1c128151cd0cd7b5 (plain)
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
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;