Struct puffin::Record

source ·
pub struct Record<'s> {
    pub start_ns: NanoSecond,
    pub duration_ns: NanoSecond,
    pub id: &'s str,
    pub location: &'s str,
    pub data: &'s str,
}
Expand description

Used when parsing a Stream.

Fields§

§start_ns: NanoSecond§duration_ns: NanoSecond§id: &'s str

e.g. function name. Mandatory. Used to identify records. Does not need to be globally unique, just unique in the parent scope. Example: “load_image”

§location: &'s str

e.g. file name. Optional. Used for finding the location of the profiler scope. Example: “my_library/image_loader.rs:52”

§data: &'s str

e.g. function argument, like a mesh name. Optional. Example: “image.png”.

Implementations§

source§

impl<'s> Record<'s>

source

pub fn stop_ns(&self) -> NanoSecond

Trait Implementations§

source§

impl<'s> Clone for Record<'s>

source§

fn clone(&self) -> Record<'s>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'s> Debug for Record<'s>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'s> PartialEq<Record<'s>> for Record<'s>

source§

fn eq(&self, other: &Record<'s>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'s> Copy for Record<'s>

source§

impl<'s> Eq for Record<'s>

source§

impl<'s> StructuralEq for Record<'s>

source§

impl<'s> StructuralPartialEq for Record<'s>

Auto Trait Implementations§

§

impl<'s> RefUnwindSafe for Record<'s>

§

impl<'s> Send for Record<'s>

§

impl<'s> Sync for Record<'s>

§

impl<'s> Unpin for Record<'s>

§

impl<'s> UnwindSafe for Record<'s>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.