#include "tensorstore/tensorstore.h"
Result<Spec> tensorstore::TensorStore<ElementType, Rank, Mode>::spec(
    
SpecRequestOptions&options) const;
template <typename... Option>
  
requires IsCompatibleOptionSequence<SpecRequestOptions, Option...>
Result<Spec> tensorstore::TensorStore<ElementType, Rank, Mode>::spec(
    
Option&&... option) const;

Returns a Spec that may be used to open/recreate this TensorStore.

Options that modify the returned Spec may be specified in any order. The meaning of the option is determined by its type.

Supported options include:

  • MinimalSpec: indicates whether to include in the returned Spec the metadata necessary to re-create this TensorStore. By default, the returned Spec includes the full metadata, but it is skipped if MinimalSpec{true} is specified as an option.

  • OpenMode: specifies the open mode, overriding the default of OpenMode::open. Specifying multiple modes as separate options is equivalent to ORing them together.

  • RecheckCached, RecheckCachedData, RecheckCachedMetadata: specifies cache staleness bounds, overriding the current bounds (if applicable).

  • ContextBindingMode: Indicates whether context resources should be unbound, meaning that they refer to an unresolved context resource spec (e.g. a desired number of concurrent requests, memory limits on cache pool), rather than a specific context resource (specific concurrency pool, specific cache pool). Defaults to unbind_context. If retain_context is specified, the returned Spec may be used to re-open the TensorStore using the identical context resources.

Parameters:
Option&&... option

Any option compatible with SpecRequestOptions.

Pre:

valid()