Skip to main content Skip to main content
Pigweed's logo Pigweed
  1. Home
  2. Reference
  3. Rust
  4. pw_status
  5. status_to_result

status_to_result

Function status_to_result 

Source
pub fn status_to_result(status: u32) -> Result<()>
Expand description

Convert a raw Pigweed status code into a Result.

§Returns

If status is OK (0): Ok(()). If status is a valid Error code: Err(Error). Otherwise: Err(Error::Unknown).