Skip to main content

Cast

Type Alias Cast 

Source
pub type Cast<C> = for<'x> fn(&'x dyn Any) -> 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.