pub(crate) fn sys_fill_exact(
buf: &mut [MaybeUninit<u8>],
sys_fill: impl Fn(&mut [MaybeUninit<u8>]) -> ssize_t,
) -> Result<(), Error>
Expand description
Fill a buffer by repeatedly invoking sys_fill
.
The sys_fill
function:
- should return -1 and set errno on failure
- should return the number of bytes written on success