pub fn protocol_rect(coords: [f64; 4]) -> Result<Rect, String>
Convert protocol coordinates into a validated rectangle.