Lines Matching refs:StatusCode
20 use uwb_uci_packets::StatusCode;
39 fn result_to_status_code<T>(result: Result<T>, error_msg: &str) -> StatusCode { in result_to_status_code() argument
45 Ok(_) => StatusCode::UciStatusOk, in result_to_status_code()
46 Err(Error::BadParameters) => StatusCode::UciStatusInvalidParam, in result_to_status_code()
47 Err(Error::MaxSessionsExceeded) => StatusCode::UciStatusMaxSessionsExceeded, in result_to_status_code()
48 Err(Error::CommandRetry) => StatusCode::UciStatusCommandRetry, in result_to_status_code()
49 Err(Error::RegulationUwbOff) => StatusCode::UciStatusRegulationUwbOff, in result_to_status_code()
51 Err(_) => StatusCode::UciStatusFailed, in result_to_status_code()
84 assert_eq!(byte_result_helper(Ok(10), "Test"), u8::from(StatusCode::UciStatusOk) as i8); in test_byte_result_helper()
87 u8::from(StatusCode::UciStatusInvalidParam) as i8 in test_byte_result_helper()
91 u8::from(StatusCode::UciStatusMaxSessionsExceeded) as i8 in test_byte_result_helper()
95 u8::from(StatusCode::UciStatusCommandRetry) as i8 in test_byte_result_helper()
99 u8::from(StatusCode::UciStatusRegulationUwbOff) as i8 in test_byte_result_helper()
105 u8::from(StatusCode::UciStatusFailed) as i8 in test_byte_result_helper()