Skip to main content

with_memory

Function with_memory 

Source
fn with_memory<R>(
    memory: Option<&mut [u8]>,
    size: impl FnOnce() -> usize,
    draw: impl FnMut(&mut [u8]) -> R,
) -> R
Expand description

Runs draw with the caller’s memory, or with scratch memory of the size size returns when the caller has none.