fn render_timelines(
    visualization_data: &VisualizationData,
    resource_owners_layout: &HashMap<&u64, TimelineColumnData>,
    registry: &Handlebars
) -> String {
    let mut output = String::new();
    let timelines = &visualization_data.timelines;
    for (hash, timeline) in timelines {
        let rap = &timeline.resource_access_point;
        let rap_states = visualization_data.get_states(hash);
        for (line_start, line_end, state) in rap_states.iter() {
            let data = match rap {
                ResourceAccessPoint::Function(_) => {
                    None
                },
                _ => {
                    Some (
                        VerticalLineData {
                            line_class: String::new(),
                            hash: *hash,
                            x1: resource_owners_layout[hash].x_val,
                            y1: get_y_axis_pos(line_start),
                            x2: resource_owners_layout[hash].x_val,
                            y2: get_y_axis_pos(line_end),
                            title: state.print_message_with_name(rap.name())
                        }
                    )
                }
            };
            match rap {
                ResourceAccessPoint::Function(_) => {
                    // Don't do anything
                },
                ResourceAccessPoint::Owner(_) => {
                    output.push_str(
                        // the unwrap is safe as long as data is built in this branch. 
                        &create_owner_line_string(rap, state, &mut data.unwrap(), registry)
                    );
                },
                ResourceAccessPoint::StaticRef(_) | ResourceAccessPoint::MutRef(_) => {
                    output.push_str(
                        // the unwrap is safe as long as data is built in this branch. 
                        &create_reference_line_string(rap, state, &mut data.unwrap(), registry)
                    );
                },
            }
        }
    }
    output
}
// render timelines (states) for RAPs using vertical lines
render timelines (states) for RAPs using vertical lines
render timelines ( states ) for RAPs using vertical lines
fn render_timelines(
    visualization_data: &VisualizationData,
    resource_owners_layout: &HashMap<&u64, TimelineColumnData>,
    registry: &Handlebars
) -> String {
    let mut output = String::new();
    let timelines = &visualization_data.timelines;
    for (hash, timeline) in timelines {
        let rap = &timeline.resource_access_point;
        let rap_states = visualization_data.get_states(hash);
        for (line_start, line_end, state) in rap_states.iter() {
            let data = match rap {
                ResourceAccessPoint::Function(_) => {
                    None
                },
                _ => {
                    Some (
                        VerticalLineData {
                            line_class: String::new(),
                            hash: *hash,
                            x1: resource_owners_layout[hash].x_val,
                            y1: get_y_axis_pos(line_start),
                            x2: resource_owners_layout[hash].x_val,
                            y2: get_y_axis_pos(line_end),
                            title: state.print_message_with_name(rap.name())
                        }
                    )
                }
            };
            match rap {
                ResourceAccessPoint::Function(_) => {
                    // Don't do anything
                },
                ResourceAccessPoint::Owner(_) => {
                    output.push_str(
                        // the unwrap is safe as long as data is built in this branch. 
                        &create_owner_line_string(rap, state, &mut data.unwrap(), registry)
                    );
                },
                ResourceAccessPoint::StaticRef(_) | ResourceAccessPoint::MutRef(_) => {
                    output.push_str(
                        // the unwrap is safe as long as data is built in this branch. 
                        &create_reference_line_string(rap, state, &mut data.unwrap(), registry)
                    );
                },
            }
        }
    }
    output
}
fn render_timelines ( visualization_data : & VisualizationData , resource_owners_layout : & HashMap < & u64 , TimelineColumnData > , registry : & Handlebars ) -> String { let mut output = String :: new ( ) ; let timelines = & visualization_data . timelines ; for ( hash , timeline ) in timelines { let rap = & timeline . resource_access_point ; let rap_states = visualization_data . get_states ( hash ) ; for ( line_start , line_end , state ) in rap_states . iter ( ) { let data = match rap { ResourceAccessPoint :: Function ( _ ) => { None } , _ => { Some ( VerticalLineData { line_class : String :: new ( ) , hash : * hash , x1 : resource_owners_layout [ hash ] . x_val , y1 : get_y_axis_pos ( line_start ) , x2 : resource_owners_layout [ hash ] . x_val , y2 : get_y_axis_pos ( line_end ) , title : state . print_message_with_name ( rap . name ( ) ) } ) } } ; match rap { ResourceAccessPoint :: Function ( _ ) => { // Don't do anything } , ResourceAccessPoint :: Owner ( _ ) => { output . push_str ( // the unwrap is safe as long as data is built in this branch.  & create_owner_line_string ( rap , state , & mut data . unwrap ( ) , registry ) ) ; } , ResourceAccessPoint :: StaticRef ( _ ) | ResourceAccessPoint :: MutRef ( _ ) => { output . push_str ( // the unwrap is safe as long as data is built in this branch.  & create_reference_line_string ( rap , state , & mut data . unwrap ( ) , registry ) ) ; } , } } } output }
render timelines (states) for RAPs using vertical lines
render timelines ( states ) for RAPs using vertical lines
visualization_data
&VisualizationData
resource_owners_layout
&HashMap<&u64, TimelineColumnData>
registry
&Handlebars