1 2 3 4 5 6 7 8
use syrette::ptr::TransientPtr; pub trait IFood: Send + Sync { fn eat(&self); } pub type IFoodFactory = dyn Fn() -> TransientPtr<dyn IFood> + Send + Sync;