func FromDescriptor(desc ociv1.Descriptor, mBytes []byte) (Manifest, error) {
	mc := common{
		digest:   desc.Digest,
		mt:       desc.MediaType,
		manifSet: true,
		rawBody:  mBytes,
	}
	return fromCommon(mc)
}
FromDescriptor creates a new manifest from a descriptor and the raw manifest bytes.
package manifest
import (
	"encoding/json"
	"fmt"
	"net/http"
	"github.com/containerd/containerd/platforms"
	dockerDistribution "github.com/docker/distribution"
	dockerManifestList "github.com/docker/distribution/manifest/manifestlist"
	dockerSchema1 "github.com/docker/distribution/manifest/schema1"
	dockerSchema2 "github.com/docker/distribution/manifest/schema2"
	digest "github.com/opencontainers/go-digest"
	ociv1 "github.com/opencontainers/image-spec/specs-go/v1"
	"github.com/regclient/regclient/pkg/wraperr"
	"github.com/regclient/regclient/regclient/types"
)
type Manifest interface {
	GetConfigDescriptor() (ociv1.Descriptor, error)
	GetConfigDigest() (digest.Digest, error)
	GetDigest() digest.Digest
	GetDescriptorList() ([]ociv1.Descriptor, error)
	GetLayers() ([]ociv1.Descriptor, error)
	GetMediaType() string
	GetPlatformDesc(p *ociv1.Platform) (*ociv1.Descriptor, error)
	GetPlatformList() ([]*ociv1.Platform, error)
	GetOrigManifest() interface{}
	GetRateLimit() types.RateLimit
	GetRef() types.Ref
	HasRateLimit() bool
	IsList() bool
	IsSet() bool
	MarshalJSON() ([]byte, error)
	RawBody() ([]byte, error)
	RawHeaders() (http.Header, error)
}
func New(mediaType string, raw []byte, ref types.Ref, header http.Header) (Manifest, error) {
	mc := common{
		ref:     ref,
		mt:      mediaType,
		rawBody: raw,
	}
	if header != nil {
		mc.rawHeader = header
		if mc.mt == "" {
			mc.mt = header.Get("Content-Type")
		}
		mc.digest, _ = digest.Parse(header.Get("Docker-Content-Digest"))
		mc.setRateLimit(header)
	}
	if len(raw) > 0 {
		mc.manifSet = true
		if mc.digest == "" {
			mc.digest = digest.FromBytes(raw)
		}
	}
	return fromCommon(mc)
}