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
Serialize is straightforward. As for Deserialize, I guess it would just panic? This is useful for me when serializing and deserializing types like Result<T, !>.
The text was updated successfully, but these errors were encountered:
If we do Deserialize for ! it should error, not panic.
Is Result<T, !> the only instance where you need this? Would it make more sense to specialize De/Serialize for Result<T, !> instead of implementing them for !? Result<T, !> is equivalent to T so we might as well serialize it the same way.
The Result<T, !> was actually a simplified example. My actual use case involves an error type where one variant is generic: the actual type being deserialized is Result<T, Error<!>>. Basically, if a user implements a service that can never return an application error, the application error is !, and the framework error is Error<!>.
Serialize
is straightforward. As forDeserialize
, I guess it would just panic? This is useful for me when serializing and deserializing types likeResult<T, !>
.The text was updated successfully, but these errors were encountered: