Rust
has allows for a pattern called Type-Driven Design. In the below example a SubscriberName is created. It has a single String value. In simple code this might be represented as let subscriber_name = "Arjen".to_string();. By making the type you can wrap the validation logic into the creation of the type. This means that wherever you get a paramter of type SubscriberName you know it is valid.