I see this error when running drush cr or manually flushing the cache. I have a view with three Data Export displays:
Error: Call to undefined method Drupal\views\Plugin\views\style\DefaultStyle::getFormats() in Drupal\rest\Plugin\views\display\RestExport->collectRoutes() (line 368 of /mnt/www/html/naswastg/docroot/core/modules/rest/src/Plugin/views/display/RestExport.php) #0 /mnt/www/html/naswastg/docroot/core/modules/views/src/EventSubscriber/RouteSubscriber.php(120): Drupal\rest\Plugin\views\display\RestExport->collectRoutes(Object(Symfony\Component\Routing\RouteCollection)) #1 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes() #2 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array) #3 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild() #4 /mnt/www/html/naswastg/docroot/core/includes/common.inc(1156): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() #5 /mnt/www/html/naswastg/docroot/core/modules/system/src/Form/PerformanceForm.php(176): drupal_flush_all_caches() #6 [internal function]: Drupal\system\Form\PerformanceForm->submitCacheClear(Array, Object(Drupal\Core\Form\FormState)) #7 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/Form/FormSubmitter.php(111): call_user_func_array(Array, Array) #8 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/Form/FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #9 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(585): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #10 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(314): Drupal\Core\Form\FormBuilder->processForm('system_performa...', Array, Object(Drupal\Core\Form\FormState)) #11 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/Controller/FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm('system_performa...', Object(Drupal\Core\Form\FormState)) #12 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #13 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #14 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #15 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #16 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #17 /mnt/www/html/naswastg/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #18 /mnt/www/html/naswastg/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #19 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /mnt/www/html/naswastg/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /mnt/www/html/naswastg/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /mnt/www/html/naswastg/docroot/modules/contrib/shield/src/ShieldMiddleware.php(99): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\shield\ShieldMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /mnt/www/html/naswastg/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /mnt/www/html/naswastg/docroot/core/lib/Drupal/Core/DrupalKernel.php(657): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /mnt/www/html/naswastg/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #29 {main}.