#include "tensorstore/context.h"
template <typename Provider>
Result<Resource<Provider>> tensorstore::Context::GetResource(
    
const Resource<Provider>resource_spec) const;
template <typename Provider>
Result<Resource<Provider>> tensorstore::Context::GetResource(
    
const ::nlohmann::jsonjson_spec) const;
template <typename Provider>
Result<Resource<Provider>> tensorstore::Context::GetResource() const;

Returns a resource or the default resource for a given provider.

If the nullary overload is called, returns the default resource for Provider.

Template Parameters:
typename Provider

Context resource provider type. Must be specified when not using the resource_spec overload.

Parameters:
const Resource<Provider> &resource_spec

The resource spec. May be null, in which case a null resource is returned.

const ::nlohmann::json &json_spec

The JSON resource spec.

Dchecks:

This context is not null.