[−][src]Struct libudev::Context
A libudev context. Contexts may not be sent or shared between threads. The libudev(3)
manpage
says:
All functions require a libudev context to operate. This context can be create via udev_new(3). It is used to track library state and link objects together. No global state is used by libudev, everything is always linked to a udev context. Furthermore, multiple different udev contexts can be used in parallel by multiple threads. However, a single context must not be accessed by multiple threads in parallel.
In Rust, that means that Context
is !Send
and !Sync
. This means a Context
must be
created in the thread where it will be used. Several contexts can exist in separate threads,
but they can not be sent between threads.
Other types in this library (Device
, Enumerator
, Monitor
, etc.) share a reference to a
context, which means that these types must also be !Send
and !Sync
.
Implementations
impl Context
[src]
Trait Implementations
impl Clone for Context
[src]
fn clone(&self) -> Self
[src]
Increments reference count of libudev
context.
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Drop for Context
[src]
Auto Trait Implementations
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,