Skip to main content

check_abort

Macro check_abort 

Source
macro_rules! check_abort {
    ($dry:expr) => { ... };
}
Expand description

Utility macro to check if operation should be aborted

Returns early with Aborted error if abort flag is set

ยงUsage

use ops_rs::{check_abort, DryContext, OpError};

fn example_op(dry: &mut DryContext) -> Result<i32, OpError> {
    check_abort!(dry);
    Ok(42)
}