blob: d3d55da5554e74697a0d4a18e74964bfb58e5fbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#![allow(clippy::module_name_repetitions)]
//! Interface for a factory.
use crate::libs::intertrait::CastFrom;
use crate::ptr::TransientPtr;
/// Interface for a factory.
///
/// # Examples
/// ```
/// use syrette::interface::factory::IFactory;
///
/// type StringFactory = dyn IFactory<(), String>;
/// ```
pub trait IFactory<Args, ReturnInterface>:
Fn<Args, Output = TransientPtr<ReturnInterface>> + CastFrom
where
ReturnInterface: 'static + ?Sized,
{
}
|