Skip to main content

nova_rt_bytes_at

Function nova_rt_bytes_at 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn nova_rt_bytes_at( b: *const NovaStr, i: i64, ) -> i64
Expand description

The byte at i, as an Int in 0..=255.

Aborts on an out-of-range index. Nova’s Bytes::byte_at bounds-checks first and returns Option, so this abort guards a bug in std/bytes rather than user error — and it aborts rather than panicking because a panic here could unwind through a generated poll frame.

§Safety

b must point to a live NovaStr.