Skip to main content

Module kind

Module kind 

Source
Expand description

Canonical kind strings for tagged condition values.

These constants are emitted into the kind slot of make_rust_condition_value and consumed by the R-side .miniextendr_raise_condition switch (see registry::write_r_wrappers_to_file). Reference these constants from codegen and runtime sites instead of bare string literals so a typo cannot silently change which switch arm fires.

The constants are kept in lockstep with the generated R helper; if a new kind is added, both the emission site and the R helper need to learn it.

Constants§

CONDITION
User-raised condition!(...) condition.
CONVERSION
TryFromSexp / coerce / strict-mode conversion failed at argument unmarshalling.
ERROR
User-raised error!(...) condition.
MESSAGE
User-raised message!(...) condition.
NONE_ERR
Option<T>::None reached where a value was required (raised by the NoneOnErr / required-Option return paths).
OTHER_RUST_ERROR
Fallback kind written by super::make_rust_condition_value when the caller’s kind argument contained an interior NUL and could not be converted to a CString. Should not appear in normal flow; the match arm in [crate::condition::RCondition::from_sexp] handles it defensively by degrading to RCondition::Error.
PANIC
Default kind for Rust panics that surface to R via the generic panic path (no RCondition payload). Layered as rust_error.
RESULT_ERR
Result<_, E>::Err(...) formatted via Debug (raised when the user returns an Err from a #[miniextendr] fn/method).
WARNING
User-raised warning!(...) condition.