pub struct Timeline {
pub relations: Vec<LifetimeRelation>,
pub min_time: u64,
pub max_time: u64,
}Expand description
Timeline representation for visualization.
Fields§
§relations: Vec<LifetimeRelation>All lifetime relations in chronological order
min_time: u64Minimum timestamp
max_time: u64Maximum timestamp
Implementations§
Source§impl Timeline
impl Timeline
Sourcepub fn from_events(events: &[Event]) -> Self
pub fn from_events(events: &[Event]) -> Self
Create a timeline from events
Sourcepub fn relations_for(&self, var_id: &str) -> Vec<&LifetimeRelation>
pub fn relations_for(&self, var_id: &str) -> Vec<&LifetimeRelation>
Get all relations for a specific variable
Sourcepub fn active_at(&self, timestamp: u64) -> Vec<&LifetimeRelation>
pub fn active_at(&self, timestamp: u64) -> Vec<&LifetimeRelation>
Get all active relations at a specific timestamp
Sourcepub fn lifetimes_overlap(&self, var1: &str, var2: &str) -> bool
pub fn lifetimes_overlap(&self, var1: &str, var2: &str) -> bool
Check if two variables have overlapping lifetimes
Sourcepub fn total_duration(&self) -> u64
pub fn total_duration(&self) -> u64
Get the total duration of the timeline
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Timeline
impl<'de> Deserialize<'de> for Timeline
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Timeline
impl RefUnwindSafe for Timeline
impl Send for Timeline
impl Sync for Timeline
impl Unpin for Timeline
impl UnwindSafe for Timeline
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)