Skip to main content

qos_from_c

Function qos_from_c 

Source
pub fn qos_from_c(q: &NrosRmwQos) -> QoSProfile
Expand description

The inverse of [TryFrom<QoSProfile> for NrosRmwQos] — what a C backend ANSWERED, back in the vocabulary a Rust caller reasons in.

Infallible on purpose, and the reason is the _ => arms: this reads a value a BACKEND wrote, and a backend that writes a discriminant this ABI does not define has told us nothing about that policy. Unknown is exactly that statement, so an unrecognised value degrades to “I cannot say” rather than to a confident wrong policy or to an error that would discard the four fields that WERE readable. depth widens (u16 -> u32) and cannot lose.