use crate::private::cast::CastFrom;
use crate::ptr::TransientPtr;
pub trait IFactory<ReturnInterface, DIContainerT>: CastFrom
where
ReturnInterface: 'static + ?Sized,
{
fn call(&self, di_container: &DIContainerT) -> TransientPtr<ReturnInterface>;
}
#[cfg(feature = "async")]
pub trait IThreadsafeFactory<ReturnInterface, DIContainerT>:
crate::private::cast::CastFromArc
where
ReturnInterface: 'static + ?Sized,
{
fn call(&self, di_container: &DIContainerT) -> TransientPtr<ReturnInterface>;
}