aboutsummaryrefslogtreecommitdiff
path: root/examples/async/interfaces/food.rs
blob: b310a3de2e3b05861aaf1fd24c79490226b01834 (plain)
1
2
3
4
5
6
7
8
9
10
use syrette::factory;
use syrette::ptr::TransientPtr;

pub trait IFood
{
    fn eat(&self);
}

#[factory(threadsafe = true)]
pub type IFoodFactory = dyn Fn() -> TransientPtr<dyn IFood>;