Macro iceberg::ensure_data_valid

source ·
macro_rules! ensure_data_valid {
    ($cond: expr, $fmt: literal, $($arg:tt)*) => { ... };
}
Expand description

Helper macro to check arguments.

Example:

Following example check a > 0, otherwise returns an error.

use iceberg::check;
ensure_data_valid!(a > 0, "{} is not positive.", a);