macro_rules! not_allowed {
($err:expr) => { ... };
($fmt:expr, $($arg:tt)*) => { ... };
}Expand description
Returns early with a Error::NotAllowed.
ยงExamples
use fory_core::not_allowed;
use fory_core::error::Error;
fn check_operation() -> Result<(), Error> {
not_allowed!("operation not allowed");
}
fn check_operation_with_context(op: &str) -> Result<(), Error> {
not_allowed!("operation {} not allowed", op);
}