Function try_allocate_frame_id

Source
pub fn try_allocate_frame_id() -> Result<Option<FrameId>, BenchWriteError>
Expand description

Allocates a frame identifier on the global session. Returns Ok(None) when the recorder is disabled or legacy.

§Errors

Returns Finished when the installed session has already closed.

§Examples

let frame: Option<ailloli_ui_bench::FrameId> =
    ailloli_ui_bench::try_allocate_frame_id()?;
let _ = frame;