code: public function matchesTo(MediaTypeInterface $mediaType): ?Encoding
      {
          return collect($this->stack)->first(function (Encoding $encoding) use ($mediaType) {
              return $encoding->matchesTo($mediaType);
          });
      }
docs: Get the encoding that matches the supplied media type.
  
  @param MediaTypeInterface $mediaType
  @return Encoding|null