Skip to documentation
SplitScript
  • Language
  • Standard library
  • Guides
  • Migration

SplitScript reference / Language / T!

T!

syntax

Type!

Names a fallible result type.

A T! contains either Ok(T) or a String error. Plain values lift to Ok, and match uses Ok(value) plus Err(error).

Examples

Return a fallible value

fn readHealth() -> i32! {
    return process.read<i32>(healthAddress)?
}
Generated from the SplitScript compiler's documentation catalogs.