You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Serialite currently uses it own implementation of DeserializationResult. We should replace this with Result defined in the popular Returns library. Parsita previously made this migration. This would integrate Serialite into the Returns ecosystem.
Any return types of DeserializationResult[Output] would be replaced with Result[Output, DeserializationError]. Just like Parsita, we should reexport serialite.Result = result.Result[Output, DeserializationError], Success = result.Success, and Failure = result.Failure[DeserializationError].
The biggest loss would be the or_die method. In Returns, the syntax for returning the success value or raising the failure is rather ugly: result.alt(raise_exception).unwrap().
The text was updated successfully, but these errors were encountered:
Serialite currently uses it own implementation of
DeserializationResult
. We should replace this withResult
defined in the popular Returns library. Parsita previously made this migration. This would integrate Serialite into the Returns ecosystem.Any return types of
DeserializationResult[Output]
would be replaced withResult[Output, DeserializationError]
. Just like Parsita, we should reexportserialite.Result = result.Result[Output, DeserializationError]
,Success = result.Success
, andFailure = result.Failure[DeserializationError]
.The biggest loss would be the
or_die
method. In Returns, the syntax for returning the success value or raising the failure is rather ugly:result.alt(raise_exception).unwrap()
.The text was updated successfully, but these errors were encountered: