Skip to main content

with_type_registry

Function with_type_registry 

Source
pub fn with_type_registry<T>(reg: WireTypeRegistry, f: impl FnOnce() -> T) -> T
Expand description

Install a shared type registry for the duration of f (consulted by BOTH encode and decode). Restores the previous registry on return or panic.