pub struct Udev { /* private fields */ }Expand description
libudev context
The context contains the default values read from the udev config file, and is passed to all library operations.
Implementations§
Source§impl Udev
impl Udev
Sourcepub fn log<M: Display>(&self, priority: LogPriority, msg: M)
pub fn log<M: Display>(&self, priority: LogPriority, msg: M)
Convenience function for udev log messages.
Sourcepub fn set_sys_path<P: Into<String>>(&mut self, path: P)
pub fn set_sys_path<P: Into<String>>(&mut self, path: P)
Sets the system path.
Sourcepub fn with_sys_path<P: Into<String>>(self, path: P) -> Self
pub fn with_sys_path<P: Into<String>>(self, path: P) -> Self
Builder function that sets the system path.
Sourcepub fn set_dev_path<P: Into<String>>(&mut self, path: P)
pub fn set_dev_path<P: Into<String>>(&mut self, path: P)
Sets the device path.
Sourcepub fn with_dev_path<P: Into<String>>(self, path: P) -> Self
pub fn with_dev_path<P: Into<String>>(self, path: P) -> Self
Builder function that sets the device path.
Sourcepub fn rules_path(&self) -> &[String]
pub fn rules_path(&self) -> &[String]
Gets a reference to the list of rules paths.
Sourcepub fn rules_path_mut(&mut self) -> &mut [String]
pub fn rules_path_mut(&mut self) -> &mut [String]
Gets a mutable reference to the list of rules paths.
Sourcepub fn set_rules_path<R: Into<String> + Clone>(&mut self, rules: &[R])
pub fn set_rules_path<R: Into<String> + Clone>(&mut self, rules: &[R])
Sets the list of rules paths.
Sourcepub fn with_rules_path<R: Into<String> + Clone>(self, rules: &[R]) -> Self
pub fn with_rules_path<R: Into<String> + Clone>(self, rules: &[R]) -> Self
Builder function that sets the list of rules paths.
Sourcepub fn rules_path_ts(&self) -> &[u64]
pub fn rules_path_ts(&self) -> &[u64]
Gets a reference to the list of rules path timestamps.
Sourcepub fn rules_path_ts_mut(&mut self) -> &mut [u64]
pub fn rules_path_ts_mut(&mut self) -> &mut [u64]
Gets a mutable reference to the list of rules path timestamps.
Sourcepub fn set_rules_path_ts<T: Into<u64> + Clone>(&mut self, ts: &[T])
pub fn set_rules_path_ts<T: Into<u64> + Clone>(&mut self, ts: &[T])
Sets the list of rules path timestamps.
Sourcepub fn with_rules_path_ts<T: Into<u64> + Clone>(self, ts: &[T]) -> Self
pub fn with_rules_path_ts<T: Into<u64> + Clone>(self, ts: &[T]) -> Self
Builder function that sets the list of rules path timestamps.
Sourcepub fn rules_path_count(&self) -> usize
pub fn rules_path_count(&self) -> usize
Gets the number of populated rules path entries.
Sourcepub fn set_run_path<P: Into<String>>(&mut self, path: P)
pub fn set_run_path<P: Into<String>>(&mut self, path: P)
Sets the run path.
Sourcepub fn with_run_path<P: Into<String>>(self, path: P) -> Self
pub fn with_run_path<P: Into<String>>(self, path: P) -> Self
Builder function that sets the run path.
Sourcepub fn properties_list(&self) -> Result<&UdevList>
pub fn properties_list(&self) -> Result<&UdevList>
Gets a reference to the properties list UdevList.
NOTE User is responsible for initializing the properties_list before calling.
Sourcepub fn properties_list_mut(&mut self) -> Result<&mut UdevList>
pub fn properties_list_mut(&mut self) -> Result<&mut UdevList>
Gets a mutable reference to the properties list UdevList.
NOTE User is responsible for initializing the properties_list before calling.
Sourcepub fn set_properties_list<L: Into<UdevEntryList>>(arc: &mut Arc<Self>, list: L)
pub fn set_properties_list<L: Into<UdevEntryList>>(arc: &mut Arc<Self>, list: L)
Sets the properties list UdevList.
Sourcepub fn with_properties_list<L: Into<UdevEntryList>>(
arc: Arc<Self>,
list: L,
) -> Arc<Self>
pub fn with_properties_list<L: Into<UdevEntryList>>( arc: Arc<Self>, list: L, ) -> Arc<Self>
Builder function that sets the properties list UdevList.
Sourcepub const fn log_priority(&self) -> LogPriority
pub const fn log_priority(&self) -> LogPriority
Gets the LogPriority.
Sourcepub fn set_log_priority<P: Into<LogPriority>>(&mut self, priority: P)
pub fn set_log_priority<P: Into<LogPriority>>(&mut self, priority: P)
Sets the LogPriority.
Sourcepub fn with_log_priority<P: Into<LogPriority>>(self, priority: P) -> Self
pub fn with_log_priority<P: Into<LogPriority>>(self, priority: P) -> Self
Builder function that sets the LogPriority.
Sourcepub fn has_devtmpfs(&self) -> bool
pub fn has_devtmpfs(&self) -> bool
Gets whether /dev is mounted on devtmpfs.