Struct udev::Udev[][src]

pub struct Udev { /* fields omitted */ }

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

impl Udev[src]

pub fn new() -> Result<Self>[src]

Creates a new Udev context.

Trait Implementations

impl AsRaw<udev> for Udev[src]

impl Clone for Udev[src]

impl Drop for Udev[src]

impl FromRaw<udev> for Udev[src]

Auto Trait Implementations

impl RefUnwindSafe for Udev

impl !Send for Udev

impl !Sync for Udev

impl Unpin for Udev

impl UnwindSafe for Udev

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.