Skip to main content

build

Function build 

Source
pub async fn build(
    remote: &RemoteUrl,
) -> Result<(Arc<dyn ObjectStore>, StorageEngine), BackendError>
Expand description

Construct the right ObjectStore for remote, verify it is reachable with a single low-cost list call, and resolve the storage engine from the FORMAT key in one pass.

Returns the connected store paired with the resolved StorageEngine. The engine is computed from FORMAT (when present) plus the URL’s ?engine= flag, with StorageEngine::Bundle as the default for buckets that have no FORMAT key yet.

§Errors

Returns BackendError if the backend cannot be constructed (e.g. invalid credentials or endpoint), the probe list call fails (e.g. bucket/container not found or permission denied), or the FORMAT key conflicts with ?engine=.