turso_assert_some!() { /* proc-macro */ }Expand description
Asserts that at least one of multiple named conditions is true whenever this line is reached (logical OR). All conditions are evaluated.
§Behavior
- Without
antithesisfeature: panics if none of the conditions are true (likeassert!). - With
antithesisfeature: reports the property to Antithesis viaassert_always_or_unreachable!. On failure, prints the error to stderr and callsstd::process::exit(0)instead of panicking.
§Parameters
{name: condition, ...}— named boolean conditions in curly braces. Names are labels for Antithesis reporting."message"— human-readable description (required).{ "key": value, ... }(optional) — structured details for Antithesis.
§Usage
ⓘ
turso_assert_some!(
{is_leaf: page.is_leaf(), is_interior: page.is_interior()},
"page must be either leaf or interior"
);
turso_assert_some!(
{has_data: !row.is_empty(), has_rowid: row.rowid().is_some()},
"row must have data or a rowid",
{ "table": table_name }
);§When to use
Use whenever a condition has a logical OR.