Refined Types in Rust: Parse, Don't Validate

The String Problem # How many times have you seen function signatures like this? fn send_email ( to : String , subject : String , body : String ) -> Result < (), Error > ; fn create_user ( email : String , username : String , password : String ) -> Result < User , Error > ; fn transfer_money ( from_iban : String , to_iban : String , amount : f64 ) -> Result < (), Error > ; Every String in these…