baml.http._timeout_nanos

(internal) Converts an optional timeout into the nanosecond count carried across the sys-op boundary. `null` (no deadline) becomes `0n`, which the native layer treats as unbounded. Modeled on Rust's `Option<Duration>`.

Reference version

Signature

function baml.http._timeout_nanos(timeout: baml.time.Duration | null) -> bigint throws never

(internal) Converts an optional timeout into the nanosecond count carried across the sys-op boundary. null (no deadline) becomes 0n, which the native layer treats as unbounded. Modeled on Rust's Option<Duration>.

Source:<builtin>/baml/ns_http/http.bamlbytes 54185603