Skip to main content

MeteringFactory

Type Alias MeteringFactory 

Source
pub type MeteringFactory = Box<dyn FnOnce(&MeteringInit<'_>) -> Result<Option<Arc<dyn Metering>>, String> + Send>;
Expand description

Deployment hook: build the metering implementation once models are loaded. Ok(None) = no accounting (the stock no-ledger shape). An Err is a startup FATAL — accounting configuration never fails open.

Aliased Type§

pub struct MeteringFactory(/* private fields */);