Skip to content

Option, Result, and Error

Source boundary: This page summarizes the Edition 1 documentation shipped with nebo-v1.1.0. It is a reading guide, not a fresh execution test or a compatibility guarantee for your compiler.

Concept What the versioned documentation describes
Option A value may be present as Some or absent as None; the payload has a declared type.
Result Success and failure use distinct Ok and Err branches, preserving their respective payload types.
Error Structured diagnostic identity carries more than a rendered message.

Sources: Option rules, Result rules and Error identity.

Do not treat an absent value as a default integer or observe an error payload as a success payload. The published Option rules restrict observation to the selected variant. The Result rules also discuss owned payloads across function returns, so ownership remains relevant.

The Error reference distinguishes codes, categories, spans, context and causes. Preserve structured diagnostics when reporting a failure; message text alone may omit the relevant source location or identity.

This summary intentionally leaves constructor signatures and propagation recipes to the versioned references. They have not been re-executed for this site’s current publication.