fn with_memory<R>(
memory: Option<&mut [u8]>,
size: impl FnOnce() -> usize,
draw: impl FnMut(&mut [u8]) -> R,
) -> RExpand description
Runs draw with the caller’s memory, or with scratch memory of the
size size returns when the caller has none.