3 ms·
This is why constructors are dumb IMO and rust way is the right way. Nothing stops you from returning Result<CorrectObject,ConstructorError> in CorrectObject::
by 0x457 1y ago
This is why constructors are dumb IMO and rust way is the right way.
Nothing stops you from returning Result<CorrectObject,ConstructorError> in CorrectObject::new(..) function because it's just a regular function struct field visibility takes are if you not being able to construct incorrect CorrectObject.