pub struct MSTraceSegment<'id> { /* private fields */ }
Expand description
A container for a continuous trace segment.
Implementations§
Source§impl<'id> MSTraceSegment<'id>
impl<'id> MSTraceSegment<'id>
Sourcepub fn start_time(&self) -> MSResult<OffsetDateTime>
pub fn start_time(&self) -> MSResult<OffsetDateTime>
Returns the time of the the first sample.
Sourcepub fn end_time(&self) -> MSResult<OffsetDateTime>
pub fn end_time(&self) -> MSResult<OffsetDateTime>
Returns the time of the the last sample.
Sourcepub fn sample_rate_hz(&self) -> c_double
pub fn sample_rate_hz(&self) -> c_double
Returns the nominal sample rate as samples per second (Hz
)
Sourcepub fn sample_cnt(&self) -> i64
pub fn sample_cnt(&self) -> i64
Returns the number of samples in trace coverage.
Sourcepub fn data_samples<T: DataSampleType>(&mut self) -> MSResult<&[T]>
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.
Sourcepub fn data_size(&self) -> u64
pub fn data_size(&self) -> u64
Returns the size of the buffer for (unpacked) data samples in bytes.
Sourcepub fn num_samples(&self) -> i64
pub fn num_samples(&self) -> i64
Returns the number of (unpacked) data samples.
Sourcepub fn sample_type(&self) -> MSSampleType
pub fn sample_type(&self) -> MSSampleType
Returns the trace segment sample type.
Sourcepub fn is_data_unpacked(&self) -> bool
pub fn is_data_unpacked(&self) -> bool
Returns whether the data samples are unpacked.
Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more