pub trait FnRes: FnMeta + FnMetaDyn {
type Ret;
// Required methods
fn call(&self, resources: &Resources) -> Self::Ret;
fn try_call(&self, resources: &Resources) -> Result<Self::Ret, BorrowFail>;
}
Expand description
Function that gets its arguments / parameters from a Resources
map.
This allows consumers of this library to hold onto multiple resource
functions as Box<dyn FnRes>
, even though their arguments may be
different.