pub fn model_status_code(raw: Option<u64>, default: u16) -> Option<u16>Expand description
Turn a model-supplied HTTP status code into a u16, or None when it is not one.
The range check has to happen before the cast, not after. as u16 on a u64 truncates
silently, and truncation lands on plausible values: 65736 as u16 == 200, so an
out-of-range code the executor somehow let through would become a 200 OK — a refusal
turned into an answer, which is the LDAP result_code as u8 defect in a different protocol.
execute_status and execute_object_response already bound code to 100..600; this is the
second lock on the same door, and it fails closed instead of narrowing.