code: func (i *pushingIngester) Writer(ctx context.Context, opts ...content.WriterOpt) (content.Writer, error) {
  	var wOpts content.WriterOpts
  	for _, opt := range opts {
  		if err := opt(&wOpts); err != nil {
  			return nil, err
  		}
  	}
  	if wOpts.Ref == "" {
  		return nil, errors.Wrap(errdefs.ErrInvalidArgument, "ref must not be empty")
  	}
  	// pusher requires desc.MediaType to determine the PUT URL, especially for manifest blobs.
  	contentWriter, err := i.p.Push(ctx, wOpts.Desc)
  	if err != nil {
  		return nil, err
  	}
  	return &writer{
  		Writer:           contentWriter,
  		contentWriterRef: wOpts.Ref,
  	}, nil
  }
docs: // Writer implements content.Ingester. desc.MediaType must be set for manifest blobs.