Skip to main content

else_debug_log

Function else_debug_log 

Source
pub fn else_debug_log<T, E>(error: E) -> Result<T, Infallible>
where T: Default, Error: From<E>,
Expand description

Debug-logs an error and recovers with a default value in an infallible result.

The input is converted to Error and emitted through the debug-aware logging path. The returned Ok contains Default::default for the requested value type.