Skip to main content

drain_snapshot

Function drain_snapshot 

Source
pub(crate) fn drain_snapshot(out: &mut [u8]) -> usize
Expand description

Move the ring contents since mark_snapshot_floor into out, dropping the oldest bytes if needed so the newest data always fits. Consumes everything.

Used by the panic handler to snapshot the panic banner plus the log lines that followed the boot-time replay for persistence.