what is the easiest way to enforce that a field in a struct must not be an empty string ("")?
Example:
struct User{
name: String,
otherAttribute: Option<String>
}
user1 = User{"".toString(), "".toString()} //--> this should throw an error
I know I can implement the "new" trait for User and enforce special rules there but for large structs this is not a lot of fun.