UpdateEmailUseCase
Updates the user's email address. keep in mind that this use case does not update the email immediately, it only sends a request to the backend. the use need to confirm the email change by clicking on the link in an email they receive.
Return
Result.Success if the email was updated successfully.
Result.Failure.InvalidEmail if the email is invalid.
Result.Failure.EmailAlreadyInUse if the email is already in use.
Result.Failure.GenericFailure if the email update failed for any other reason.
Parameters
email
The new email address.
See also
UserRepository.updateSelfEmail