pub struct Debugvars {
pub configfile: Option<String>,
pub version: Option<String>,
pub content: String,
pub parsed_debugvars: Option<HashMap<String, u64>>,
}Expand description
Represents PDSC Debugvars
Fields§
§configfile: Option<String>The relative path to the configuration file containing debugvars
version: Option<String>Debugvars version
content: StringDebugvars variable declarations
parsed_debugvars: Option<HashMap<String, u64>>Parsed debugvars, initially None, generated by Debugvars::parse_debugvars
Implementations§
Source§impl Debugvars
impl Debugvars
Sourcepub fn parse_single_debugvar(
line: &str,
) -> Result<(String, u64), FamilyParseError>
pub fn parse_single_debugvar( line: &str, ) -> Result<(String, u64), FamilyParseError>
Parses a single variable declaration entry.
Returns Ok((name, value)) for a valid __var name = value; declaration.
§Errors
Returns FamilyParseError::MalformedDebugvar if the line is not a valid __var declaration.
Sourcepub fn parse_debugvars_content(&self) -> HashMap<String, u64>
pub fn parse_debugvars_content(&self) -> HashMap<String, u64>
Parses the debugvars content and returns a hashmap with the variable name as the key and the value as the value
Sourcepub fn parse_debugvars(&mut self)
pub fn parse_debugvars(&mut self)
Performs the parsing and stores values in Self::parsed_debugvars
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Debugvars
impl<'de> Deserialize<'de> for Debugvars
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Debugvars
impl StructuralPartialEq for Debugvars
Auto Trait Implementations§
impl Freeze for Debugvars
impl RefUnwindSafe for Debugvars
impl Send for Debugvars
impl Sync for Debugvars
impl Unpin for Debugvars
impl UnsafeUnpin for Debugvars
impl UnwindSafe for Debugvars
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