pub struct ProbeOutput { /* private fields */ }Expand description
Parsed output from the probe script, organized by section.
Implementations§
Source§impl ProbeOutput
impl ProbeOutput
Sourcepub fn parse(output: &str) -> Result<Self>
pub fn parse(output: &str) -> Result<Self>
Parse the probe script output into sections.
Each section is delimited by ===OMNYSSH:NAME=== markers.
Returns Ok even for empty or malformed input (graceful degradation).
§Errors
Never returns an error — unknown or malformed output is silently ignored.
Sourcepub fn has_section(&self, name: &str) -> bool
pub fn has_section(&self, name: &str) -> bool
Check if a specific section exists and has non-empty content.
Sourcepub fn get_section(&self, name: &str) -> Option<&str>
pub fn get_section(&self, name: &str) -> Option<&str>
Get the content of a section, or None if it doesn’t exist.
Sourcepub fn parse_os_info(&self) -> Option<String>
pub fn parse_os_info(&self) -> Option<String>
Parse OS information from the OS section.
Extracts OS name and version from /etc/os-release format. Returns a formatted string like “Ubuntu 22.04 LTS” or “Debian GNU/Linux 11”.
Trait Implementations§
Source§impl Clone for ProbeOutput
impl Clone for ProbeOutput
Source§fn clone(&self) -> ProbeOutput
fn clone(&self) -> ProbeOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProbeOutput
impl Debug for ProbeOutput
Source§impl Default for ProbeOutput
impl Default for ProbeOutput
Source§fn default() -> ProbeOutput
fn default() -> ProbeOutput
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProbeOutput
impl RefUnwindSafe for ProbeOutput
impl Send for ProbeOutput
impl Sync for ProbeOutput
impl Unpin for ProbeOutput
impl UnsafeUnpin for ProbeOutput
impl UnwindSafe for ProbeOutput
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