turso_assert_all!() { /* proc-macro */ }Expand description
Asserts that all named conditions are true whenever this line is reached (logical AND).
§Behavior
- Without
antithesisfeature: panics if any condition is false (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."message"— human-readable description (required).{ "key": value, ... }(optional) — structured details for Antithesis.
§Usage
ⓘ
turso_assert_all!(
{valid_size: page_size > 0, within_bounds: offset < page_size},
"page header fields must all be valid"
);
// With structured details
turso_assert_all!(
{has_header: header.is_some(), correct_magic: magic == EXPECTED_MAGIC},
"database file must be well-formed",
{ "magic": magic }
);§When to use
Use whenever a condition has a logical AND.