Skip to main content

method_ok_and_err_types

Function method_ok_and_err_types 

Source
pub fn method_ok_and_err_types(return_ty: &Type) -> (&Type, Option<&Type>)
Expand description

Extract Ok and Err types from a return type. Returns (ok_type, Some(err_type)) for Result<T, E>, or (type, None) otherwise.