pub struct DeviceSettingGroup { /* private fields */ }Expand description
Group information for multiple setting entries
Implementations§
Source§impl DeviceSettingGroup
impl DeviceSettingGroup
Sourcepub fn from(message: &str) -> Result<Self, String>
pub fn from(message: &str) -> Result<Self, String>
Reads a single setting group line and retruns its value and index
§Error
Returns an error if parsing failed at any point
§Examples
Basic usage:
// stores:
// index, parent index and name
let response = DeviceSettingGroup::from("[SETTINGGROUP:30|29|X-axis]");
assert_eq!(response.index(), 30);
assert_eq!(response.parent_group_index(), "29");
assert_eq!(response.name(), "X-axis");Sourcepub fn is_response(message: &str) -> bool
pub fn is_response(message: &str) -> bool
Indicates if the response is a setting group
Sourcepub fn parent_group_index(&self) -> &u32
pub fn parent_group_index(&self) -> &u32
Get the index of the parent group
Trait Implementations§
Source§impl Clone for DeviceSettingGroup
impl Clone for DeviceSettingGroup
Source§fn clone(&self) -> DeviceSettingGroup
fn clone(&self) -> DeviceSettingGroup
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 moreAuto Trait Implementations§
impl Freeze for DeviceSettingGroup
impl RefUnwindSafe for DeviceSettingGroup
impl Send for DeviceSettingGroup
impl Sync for DeviceSettingGroup
impl Unpin for DeviceSettingGroup
impl UnwindSafe for DeviceSettingGroup
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