diff --git a/core/types.rs b/core/types.rs index 8a6d65d76..fb26fd50a 100644 --- a/core/types.rs +++ b/core/types.rs @@ -2466,6 +2466,12 @@ pub enum IOResult { IO, } +impl IOResult { + pub fn is_io(&self) -> bool { + matches!(self, IOResult::IO) + } +} + /// Evaluate a Result>, if IO return IO. #[macro_export] macro_rules! return_if_io {