pub struct ProviderRegistry { /* private fields */ }Expand description
Immutable set of providers used by one runtime instance.
Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
Sourcepub fn new(
providers: impl IntoIterator<Item = Arc<dyn ImageProvider>>,
default: impl Into<String>,
) -> Result<Self, BridgeError>
pub fn new( providers: impl IntoIterator<Item = Arc<dyn ImageProvider>>, default: impl Into<String>, ) -> Result<Self, BridgeError>
Creates a validated registry and deterministic default provider.
Sourcepub fn default_name(&self) -> &str
pub fn default_name(&self) -> &str
Returns the configured default provider name.
Sourcepub fn resolve(
&self,
requested: Option<&str>,
) -> Result<Arc<dyn ImageProvider>, BridgeError>
pub fn resolve( &self, requested: Option<&str>, ) -> Result<Arc<dyn ImageProvider>, BridgeError>
Resolves an explicit provider or the deterministic default.
Sourcepub fn descriptors(&self) -> Vec<ProviderDescriptor>
pub fn descriptors(&self) -> Vec<ProviderDescriptor>
Returns provider descriptors in stable name order.
Sourcepub async fn capabilities(
&self,
provider: Option<&str>,
model: Option<&str>,
) -> Result<ProviderCapabilities, BridgeError>
pub async fn capabilities( &self, provider: Option<&str>, model: Option<&str>, ) -> Result<ProviderCapabilities, BridgeError>
Returns dynamic capabilities for one selected provider/model.
Sourcepub async fn readiness(&self) -> Vec<ProviderReadiness>
pub async fn readiness(&self) -> Vec<ProviderReadiness>
Performs non-generating readiness checks in stable name order.
Trait Implementations§
Source§impl Clone for ProviderRegistry
impl Clone for ProviderRegistry
Source§fn clone(&self) -> ProviderRegistry
fn clone(&self) -> ProviderRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ProviderRegistry
impl !UnwindSafe for ProviderRegistry
impl Freeze for ProviderRegistry
impl Send for ProviderRegistry
impl Sync for ProviderRegistry
impl Unpin for ProviderRegistry
impl UnsafeUnpin for ProviderRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more