Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
0.2.0 Preview 1 · Frozen documentation

ResultValue

Borrows the value payload with readonly access when its case is active.

Sn is under heavy development. Reference extracted from this release’s bundled standard library. Public API examples are not an exhaustive compatibility test. Read the matching release guide for tested workflows and limitations. Read the status →

Module std.prelude

import std.prelude;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

ResultValue

pub fn ResultValue<T, E>(Value: readonly Result<T, E>&) -> readonly T&?

Borrows the value payload with readonly access when its case is active. T: Success payload with actual nonvoid storage. E: Error payload. Value: Wrapper borrowed for the returned reference lifetime. Return: Optional readonly payload reference, or none for the opposite case. Warning: No owner retention; case change, move or destruction invalidates this borrow.

ResultValue

pub fn ResultValue<T, E>(Value: mut Result<T, E>&) -> mut T&?

Borrows the value payload with mut access when its case is active. T: Success payload with actual nonvoid storage. E: Error payload. Value: Wrapper borrowed for the returned reference lifetime. Return: Optional mut payload reference, or none for the opposite case. Warning: No owner retention; case change, move or destruction invalidates this borrow.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library