Expand description
Inferer wrappers with state separated from the inferer.
This allows separation of stateful logic from the inner inferer, allowing the inner inferer to be swapped out while maintaining state in the wrappers.
This is an alternative to the old layered inferer setup, which tightly coupled the inner inferer with the wrapper state.
ⓘ
let inferer = ...;
// the root needs [`BaseCase`] passed as a base case.
let wrappers = RecurrentTrackerWrapper::new(BaseCase, inferer);
let wrapped = StatefulInferer::new(wrappers, infere);
// or
let wrapped = inferer.into_stateful(wrappers);
// or
let wrapped = wrappers.wrap(inferer);Structs§
- Base
Wrapper - A no-op inferer wrapper that just calls the inner inferer directly. This is the base-case of wrapper stack.
- Stateful
Inferer - An inferer that maintains state in wrappers around an inferer.
Traits§
- Inferer
Wrapper - A trait for wrapping an inferer with additional functionality.
- Inferer
Wrapper Ext - Extension trait to allow easy wrapping of an inferer with a wrapper stack.
- Into
Stateful - Extension trait to allow easy wrapping of an inferer with a wrapper stack.