Skip to main content

read_status

Function read_status 

Source
pub fn read_status(path: &Path) -> Result<AgentStatus>
Expand description

Read agent status from a file

§Arguments

  • path - Path to the status file

§Returns

Ok(AgentStatus) if read and parse succeed, Err otherwise

§Errors

Returns distinct errors for:

  • Missing file (file not found)
  • Corrupt JSON (parse error)
  • I/O errors