Why wouldn't you want to keep the constraints as close to the data as possible? That way you avoid the issue that the Rectangle struct is reused somewhere else, but without the correct constraints.
IMO the constraints should be as close to the thing that needs the data, as possible. Your object is an expression of data that may be valid in some contexts and invalid in others, and trying to pick any one of them is difficult (and leads to things like complex inheritance trees to express all the different flavors of constraints.)
I think this is the essence of the "composition over inheritance" idea that seems to be the most violated piece of sound OO advice out there.
I think this is the essence of the "composition over inheritance" idea that seems to be the most violated piece of sound OO advice out there.