Struct puffin::FrameData

source ·
pub struct FrameData { /* private fields */ }
Expand description

One frame worth of profile data, collected from many sources.

If you turn on the “packing” feature, then FrameData has interior mutability with double storage:

One or both are always stored. This allows RAM-efficient storage and viewing of many frames of profiling data. Packing and unpacking is done lazily, on-demand.

Implementations§

Number of bytes used by the packed data, if packed.

Number of bytes used when unpacked, if known.

bytes currently used by the unpacked and packed data.

Do we have a packed version stored internally?

Do we have a unpacked version stored internally?

Return the unpacked data.

This will lazily unpack if needed (and only once).

Returns Err if failing to decode the packed data.

Make the FrameData use up less memory. Idempotent.

Writes one FrameData into a stream, prefixed by its length (u32 le).

Read the next FrameData from a stream.

None is returned if the end of the stream is reached (EOF), or an end-of-stream sentinel of 0u32 is read.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.