pub trait UseProvider<Args> {
type Output: ProviderOutputBounds;
type Error: ProviderErrorBounds;
// Required method
fn use_provider(
self,
args: Args,
) -> Signal<State<Self::Output, Self::Error>>;
}Expand description
Unified trait for using providers with any parameter format
This trait provides a single, unified interface for using providers regardless of their parameter format. It automatically handles:
- No parameters
() - Tuple parameters
(param,) - Direct parameters
param
Required Associated Types§
Sourcetype Output: ProviderOutputBounds
type Output: ProviderOutputBounds
The type of data returned on success
Sourcetype Error: ProviderErrorBounds
type Error: ProviderErrorBounds
The type of error returned on failure
Required Methods§
Implementors§
Source§impl<P, Args> UseProvider<Args> for P
Unified implementation for all providers using parameter normalization
impl<P, Args> UseProvider<Args> for P
Unified implementation for all providers using parameter normalization
This single implementation replaces all the previous repetitive implementations
by using the IntoProviderParam trait to normalize different parameter formats.