Skip to main content

Module factory

Module factory 

Source
Expand description

The factory execution context and its product.

When get_or_set must produce a value, it hands the factory a FactoryContext. Through it the factory can:

The factory returns Result<FactoryProduct<V>, FactoryError>; an Err drives the fail-safe path.

Structs§

FactoryContext
Context passed to a factory, carrying stale-value information and the mutable options for the value being produced.
FactoryProduct
The value (and metadata) a factory produced, ready to be cached.
ModifiedBuilder
Builder for a modified factory result with conditional-refresh metadata.