pub async fn attach_shared_adapter<F, Fut>(
pool: &Arc<ResourcePool>,
adapter_name: &str,
phase: &str,
key: ResourceKey,
factory: F,
) -> Result<(Arc<dyn DriverAdapter>, AttachGuard), String>Expand description
Push B high-level helper: attach a shareable adapter
through the pool under Shared policy. The first phase
whose params produce key triggers factory; every
subsequent matching phase reuses the same
Arc<dyn DriverAdapter>. Each call returns a fresh
guard; the pool’s refcount drops the entry only when
every guard is released.