pub struct SystemProperties { /* private fields */ }Expand description
System properties
It can’t be created directly. Use system_properties() or system_properties_area() instead.
Implementations§
Source§impl SystemProperties
impl SystemProperties
Sourcepub fn get_with_result(&self, name: &str) -> Result<String>
pub fn get_with_result(&self, name: &str) -> Result<String>
Internal function to get property value that returns error for missing properties
Sourcepub fn get(&self, name: &str) -> String
pub fn get(&self, name: &str) -> String
Get the value of a system property Returns empty string if property is not found (Android compatible behavior)
Sourcepub fn get_with_default(&self, name: &str, default: &str) -> String
pub fn get_with_default(&self, name: &str, default: &str) -> String
Get the value of a system property with a default value Returns the default value if property is not found or on error
Sourcepub fn find(&self, name: &str) -> Result<Option<PropertyIndex>>
pub fn find(&self, name: &str) -> Result<Option<PropertyIndex>>
Get the property index of a system property by name. The property index is used to update the property value. If the property is not found, it returns Ok(None)
pub fn context_serial(&self) -> u32
pub fn serial(&self, idx: &PropertyIndex) -> u32
pub fn wait_any(&self) -> Option<u32>
pub fn wait( &self, index: Option<&PropertyIndex>, timeout: Option<&Timespec>, ) -> Option<u32>
Auto Trait Implementations§
impl Freeze for SystemProperties
impl RefUnwindSafe for SystemProperties
impl Send for SystemProperties
impl Sync for SystemProperties
impl Unpin for SystemProperties
impl UnwindSafe for SystemProperties
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