pub struct ClientFactory {
pub name: String,
pub factory_env: Box<dyn Fn() -> Box<dyn ProviderClient>>,
pub factory_val: Box<dyn Fn(ProviderValue) -> Box<dyn ProviderClient>>,
}
Fields§
§name: String
§factory_env: Box<dyn Fn() -> Box<dyn ProviderClient>>
§factory_val: Box<dyn Fn(ProviderValue) -> Box<dyn ProviderClient>>
Implementations§
Source§impl ClientFactory
impl ClientFactory
pub fn new<F1, F2>(name: &str, func_env: F1, func_val: F2) -> Selfwhere
F1: 'static + Fn() -> Box<dyn ProviderClient>,
F2: 'static + Fn(ProviderValue) -> Box<dyn ProviderClient>,
pub fn build(&self) -> Result<Box<dyn ProviderClient>, ClientBuildError>
pub fn build_from_val( &self, val: ProviderValue, ) -> Result<Box<dyn ProviderClient>, ClientBuildError>
Trait Implementations§
impl RefUnwindSafe for ClientFactory
impl UnwindSafe for ClientFactory
Auto Trait Implementations§
impl Freeze for ClientFactory
impl !Send for ClientFactory
impl !Sync for ClientFactory
impl Unpin for ClientFactory
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