Struct MSTraceSegment

Source
pub struct MSTraceSegment<'id> { /* private fields */ }
Expand description

A container for a continuous trace segment.

Implementations§

Source§

impl<'id> MSTraceSegment<'id>

Source

pub fn start_time(&self) -> MSResult<OffsetDateTime>

Returns the time of the the first sample.

Source

pub fn end_time(&self) -> MSResult<OffsetDateTime>

Returns the time of the the last sample.

Source

pub fn sample_rate_hz(&self) -> c_double

Returns the nominal sample rate as samples per second (Hz)

Source

pub fn sample_cnt(&self) -> i64

Returns the number of samples in trace coverage.

Source

pub fn data_samples<T: DataSampleType>(&mut self) -> MSResult<&[T]>

Returns the data samples of the trace segment.

Note that the data samples must have been unpacked, previously. Deferred unpacking of data samples from the internal record list is currently not implemented.

Source

pub fn data_size(&self) -> u64

Returns the size of the buffer for (unpacked) data samples in bytes.

Source

pub fn num_samples(&self) -> i64

Returns the number of (unpacked) data samples.

Source

pub fn sample_type(&self) -> MSSampleType

Returns the trace segment sample type.

Source

pub fn is_data_unpacked(&self) -> bool

Returns whether the data samples are unpacked.

Trait Implementations§

Source§

impl<'id> Debug for MSTraceSegment<'id>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'id> Freeze for MSTraceSegment<'id>

§

impl<'id> RefUnwindSafe for MSTraceSegment<'id>

§

impl<'id> !Send for MSTraceSegment<'id>

§

impl<'id> !Sync for MSTraceSegment<'id>

§

impl<'id> Unpin for MSTraceSegment<'id>

§

impl<'id> UnwindSafe for MSTraceSegment<'id>

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.
Source§

impl<T> ErasedDestructor for T
where T: 'static,