Skip to main content

nova_rt_fs_take_bytes

Function nova_rt_fs_take_bytes 

Source
#[unsafe(no_mangle)]
pub extern "C" fn nova_rt_fs_take_bytes() -> *mut NovaStr
Expand description

Take the pending payload as Bytes. Returns an empty Bytes if nothing is pending, which a correct wrapper never asks for.

Mirrors nova_rt_fs_take_string, reading the same [Slot::Buffer] – the payload left there by a successful nova_rt_fs_read, never interpreted as UTF-8.

The fs_ prefix is now historical. Since increment 3a this reads a general per-task slot, not an fs-specific one, and crate::io’s stream intrinsics stash exactly this shape of payload here too – both a read buffer and, for a write, its byte count encoded as bytes. std/io/lib.nova’s read_stdin, write_stdout and write_stderr are that outside-std/fs caller now, collecting through this same taker rather than a second one.