pub struct Udev { /* private fields */ }
Expand description
Rust wrapper for the udev
struct which represents an opaque libudev context
Most other libudev
calls take a struct udev*
argument, although whether or not this
argument is actually used depends on the version of libudev. In more recent versions the
context is ignored, therefore it sometimes works to pass a NULL or a invalid pointer for
udev
. However older versions, specifically 215 which shipped with Debian 8, expect this to
be a valid udev
struct. Thus it is not optional.
udev
is a ref-counted struct, with references added and removed with udev_ref
and
udef_unref
respectively. This Rust wrapper takes advantage of that ref counting to implement
Clone
and Drop
, so callers need not worry about any C-specific resource management.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Udev
impl UnwindSafe for Udev
Blanket Implementations
Mutably borrows from an owned value. Read more