happy-rusty
    Preparing search index...

    Type Alias SafeResult<T>

    SafeResult: Result<T, never>

    Represents a Result that can never be an Err. The error type is never, meaning the operation is infallible.

    This type is useful for:

    • Functions that always succeed but return a Result for API consistency
    • Safe extraction via intoOk() without runtime checks

    Type Parameters

    • T

      The type of the value that is always produced.

    1.8.0

    function getDefaultConfig(): SafeResult<Config> {
    return Ok({ timeout: 3000, retries: 3 });
    }

    const config = getDefaultConfig().intoOk(); // Safe, no unwrap needed