pub struct ClientFactory {
pub name: String,
pub factory: Box<dyn Fn() -> Box<dyn ProviderClient>>,
}
Fields§
§name: String
§factory: Box<dyn Fn() -> Box<dyn ProviderClient>>
Implementations§
Source§impl ClientFactory
impl ClientFactory
pub fn new<F: 'static + Fn() -> Box<dyn ProviderClient>>( name: &str, func: F, ) -> Self
pub fn build(&self) -> 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