Skip to main content

Cast

Type Alias Cast 

pub type Cast<C> = for<'x> fn(&'x (dyn Any + 'static)) -> Option<&'x C>;
Expand description

The cast a bus gives for the capability C (Provided::new): from the bus as Any to C. A plain function, usually a static, that downcasts to the implementation’s type and coerces.