pub struct Trace {
pub session: Option<Session>,
pub names: Names,
pub tracks: Vec<(Track, NameId)>,
pub records: Vec<Record>,
}Expand description
A recording in memory: what it was made of, its names and tracks, and the rest of its records in the order written.
Fields§
§session: Option<Session>§names: Names§tracks: Vec<(Track, NameId)>§records: Vec<Record>Implementations§
Source§impl Trace
impl Trace
pub fn new() -> Self
Sourcepub fn from_bytes(b: &[u8]) -> Result<Trace, Error>
pub fn from_bytes(b: &[u8]) -> Result<Trace, Error>
The recording these bytes hold, read up to where they stop.
Sourcepub fn push(&mut self, r: Record)
pub fn push(&mut self, r: Record)
Takes one record as a reader hands it: names and tracks into their tables, the session aside, the rest kept.
Sourcepub fn slice(&self, tl: &Timeline, first: usize, last: usize) -> Trace
pub fn slice(&self, tl: &Timeline, first: usize, last: usize) -> Trace
The records of frames first..=last of tl (this recording’s
timeline) and their gaps, up to the last one’s present: what a range
dragged across the bars reads, the session, names and tracks kept.
Sourcepub fn track_name(&self, t: Track) -> &str
pub fn track_name(&self, t: Track) -> &str
A track’s name: main, loop, or the one declared.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Trace
impl Freeze for Trace
impl RefUnwindSafe for Trace
impl Send for Trace
impl Sync for Trace
impl Unpin for Trace
impl UnsafeUnpin for Trace
impl UnwindSafe for Trace
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