Expand description
Provider registration and registry integration for qubit_fs.
§Register providers first
FileSystemRegistry::default() creates an empty registry. Register a
provider with FileSystemRegistry::register or
FileSystemRegistry::register_shared during startup before resolving
connections. URI-based resolution selects by scheme, so the provider ID
or one of its aliases must match that selection.
The quick-start functions below accept registries whose providers have already been registered. See the user guides below for complete provider registration examples.
§Features
| Feature | Available integration |
|---|---|
| Default (empty set) | Synchronous registry with explicit registration. |
async | Asynchronous registry with explicit registration; no implicit blocking adapter. |
inventory | Synchronous from_inventory() discovery of linked provider submissions. |
async + inventory | Asynchronous discovery is also available. |
Inventory discovery still requires linking the provider crate that submits the factories.
§Quick start
use qubit_fs::path::ConnectionUri;
use qubit_fs_registry::{
FileSystemConfig,
FileSystemRegistry,
};
fn resolve_from_registered_providers(
registry: &FileSystemRegistry,
) -> Result<(), Box<dyn std::error::Error>> {
let config = FileSystemConfig::new(ConnectionUri::parse("file:///tmp/example")?);
let _resolution = registry.resolve_config(&config)?;
Ok(())
}§Async quick start
use qubit_fs::path::ConnectionUri;
use qubit_fs_registry::{AsyncFileSystemRegistry, FileSystemConfig};
async fn resolve_from_registered_async_providers(
registry: &AsyncFileSystemRegistry,
) -> Result<(), Box<dyn std::error::Error>> {
let config = FileSystemConfig::new(ConnectionUri::parse("file:///tmp/example")?);
let _resolution = registry.resolve_config(config).await?;
Ok(())
}§Learn more
Modules§
- async_
file_ system_ providers - Link-time provider inventory for one concrete service family.
- sync_
file_ system_ providers - Link-time provider inventory for one concrete service family.
Structs§
- Async
File System Registry - Shared registry of self-described asynchronous filesystem providers.
- Async
File System Resolution - A configured asynchronous facade paired with its decoded location.
- File
System Config - Complete configuration passed to a filesystem provider factory.
- File
System Registry - Shared registry of self-described synchronous filesystem providers.
- File
System Resolution - A configured synchronous facade paired with its decoded location.
- File
System Spec - Service specification for filesystem providers.
Enums§
- Credential
Ref - Reference to credentials that must not contain secret material.
- File
System Registry Error - Error returned by filesystem-provider registration, selection, and creation.
Type Aliases§
- Async
File System Provider - Metadata-bearing asynchronous filesystem provider trait object type.
- File
System Provider - Self-described filesystem provider trait object type.
- File
System Registry Result - Result returned by filesystem registry operations.