Timeline

Struct Timeline 

Source
pub struct Timeline<T: Eq + Ord + Copy + Zero + Bounded + Add<DT, Output = T> + Sub<T, Output = T>, DT: Copy, M: Metrics<T>, TM: Metrics<T>> {
    pub latency_metrics: M,
    pub timeline: Vec<TimelineElement<T, TM>>,
    /* private fields */
}

Fields§

§latency_metrics: M§timeline: Vec<TimelineElement<T, TM>>

Implementations§

Source§

impl<T: Eq + Ord + Copy + Zero + Bounded + Add<DT, Output = T> + Sub<T, Output = T>, DT: Copy, M: Metrics<T>, TM: Metrics<T>> Timeline<T, DT, M, TM>

Source

pub fn new( start_t: T, end_t: T, timeline_dt: DT, latency_metrics: M, timeline_metrics: impl Fn() -> TM, ) -> Self

Trait Implementations§

Source§

impl<T: Eq + Ord + Copy + Zero + Bounded + Add<DT, Output = T> + Sub<T, Output = T>, DT: Copy + Eq + Debug, M: Metrics<T>, TM: Metrics<T>> Metrics<T> for Timeline<T, DT, M, TM>

Source§

fn record(&mut self, begin_t: T, end_t: T)

Source§

fn combined(self, other: Self) -> Self

Auto Trait Implementations§

§

impl<T, DT, M, TM> Freeze for Timeline<T, DT, M, TM>
where M: Freeze, DT: Freeze, T: Freeze,

§

impl<T, DT, M, TM> RefUnwindSafe for Timeline<T, DT, M, TM>

§

impl<T, DT, M, TM> Send for Timeline<T, DT, M, TM>
where M: Send, DT: Send, T: Send, TM: Send,

§

impl<T, DT, M, TM> Sync for Timeline<T, DT, M, TM>
where M: Sync, DT: Sync, T: Sync, TM: Sync,

§

impl<T, DT, M, TM> Unpin for Timeline<T, DT, M, TM>
where M: Unpin, DT: Unpin, T: Unpin, TM: Unpin,

§

impl<T, DT, M, TM> UnwindSafe for Timeline<T, DT, M, TM>
where M: UnwindSafe, DT: UnwindSafe, T: UnwindSafe, TM: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.