pub struct PropertyConfig {
pub properties_dir: Option<PathBuf>,
pub socket_dir: Option<PathBuf>,
}
Expand description
Configuration for initializing the property system
Fields§
§properties_dir: Option<PathBuf>
Directory for reading system properties (default: “/dev/properties”)
socket_dir: Option<PathBuf>
Directory for property service sockets (default: “/dev/socket”)
Implementations§
Source§impl PropertyConfig
impl PropertyConfig
Sourcepub fn from_optional_path(path: Option<PathBuf>) -> Self
pub fn from_optional_path(path: Option<PathBuf>) -> Self
Create config from optional PathBuf (for backward compatibility)
Sourcepub fn with_properties_dir<P: Into<PathBuf>>(dir: P) -> Self
pub fn with_properties_dir<P: Into<PathBuf>>(dir: P) -> Self
Create config with only properties directory
Sourcepub fn with_socket_dir<P: Into<PathBuf>>(dir: P) -> Self
pub fn with_socket_dir<P: Into<PathBuf>>(dir: P) -> Self
Create config with only socket directory
Sourcepub fn with_both_dirs<P1: Into<PathBuf>, P2: Into<PathBuf>>(
properties_dir: P1,
socket_dir: P2,
) -> Self
pub fn with_both_dirs<P1: Into<PathBuf>, P2: Into<PathBuf>>( properties_dir: P1, socket_dir: P2, ) -> Self
Create config with both directories
Sourcepub fn builder() -> PropertyConfigBuilder
pub fn builder() -> PropertyConfigBuilder
Create a new builder for PropertyConfig
Trait Implementations§
Source§impl Clone for PropertyConfig
impl Clone for PropertyConfig
Source§fn clone(&self) -> PropertyConfig
fn clone(&self) -> PropertyConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PropertyConfig
impl Debug for PropertyConfig
Source§impl Default for PropertyConfig
impl Default for PropertyConfig
Source§fn default() -> PropertyConfig
fn default() -> PropertyConfig
Returns the “default value” for a type. Read more
Source§impl From<&str> for PropertyConfig
impl From<&str> for PropertyConfig
Source§impl From<PathBuf> for PropertyConfig
impl From<PathBuf> for PropertyConfig
Auto Trait Implementations§
impl Freeze for PropertyConfig
impl RefUnwindSafe for PropertyConfig
impl Send for PropertyConfig
impl Sync for PropertyConfig
impl Unpin for PropertyConfig
impl UnwindSafe for PropertyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more