Thanks to @sweeper, this is what I was looking for:
} catch let RustBasedPackage.SessionError.Error(_, errorDetail) where errorDetail.code == .CommunicationError {
pushResetPasswordLaunchEmailAppViewController(email: email)
} catch {
presentGenericAlert()
}