fn create_owner_line_string(
    rap: &ResourceAccessPoint,
    state: &State,
    data: &mut VerticalLineData,
    registry: &Handlebars,
) -> String {
    let style = determine_owner_line_styles(rap, state);
    match (state, style) {
        (State::FullPrivilege, OwnerLine::Solid) | (State::PartialPrivilege { .. }, OwnerLine::Solid) => {
            data.line_class = String::from("solid");
            registry.render("vertical_line_template", &data).unwrap()
        },
        (State::FullPrivilege, OwnerLine::Hollow) => {
            // background for hollow line
            data.line_class = String::from("hollow");
            
            // overlap solid line with internal_line to create hollow effect
            let mut hollow_internal_line_data = data.clone();
            hollow_internal_line_data.y1 += 5;
            hollow_internal_line_data.y2 -= 5;
            hollow_internal_line_data.title = data.title.to_owned();
            
            let output = format!("{}\n{}", registry.render("vertical_line_template", &data).unwrap(),
                                           registry.render("hollow_line_internal_template", &hollow_internal_line_data).unwrap());
            output
        },
        (State::FullPrivilege, OwnerLine::Dotted) => {
            // cannot read nor write the data from this RAP temporarily (borrowed away by a mut reference)
            "".to_owned()
        }
        (State::PartialPrivilege{..}, _) => {
            data.line_class = String::from("solid");
            registry.render("vertical_line_template", &data).unwrap()
        },
        (State::OutOfScope, _) => (
            "".to_owned()
        ),
        // do nothing when the case is (RevokedPrivilege, false), (OutofScope, _), (ResourceMoved, false)
        (_, _) => (
            "".to_owned()
        ),
    }
}
// generate a Owner Line string from the RAP and its State
generate a Owner Line string from the RAP and its State
generate a Owner Line string from the RAP and its State
fn create_owner_line_string(
    rap: &ResourceAccessPoint,
    state: &State,
    data: &mut VerticalLineData,
    registry: &Handlebars,
) -> String {
    let style = determine_owner_line_styles(rap, state);
    match (state, style) {
        (State::FullPrivilege, OwnerLine::Solid) | (State::PartialPrivilege { .. }, OwnerLine::Solid) => {
            data.line_class = String::from("solid");
            registry.render("vertical_line_template", &data).unwrap()
        },
        (State::FullPrivilege, OwnerLine::Hollow) => {
            // background for hollow line
            data.line_class = String::from("hollow");
            // overlap solid line with internal_line to create hollow effect
            let mut hollow_internal_line_data = data.clone();
            hollow_internal_line_data.y1 += 5;
            hollow_internal_line_data.y2 -= 5;
            hollow_internal_line_data.title = data.title.to_owned();
            let output = format!("{}\n{}", registry.render("vertical_line_template", &data).unwrap(),
                                           registry.render("hollow_line_internal_template", &hollow_internal_line_data).unwrap());
            output
        },
        (State::FullPrivilege, OwnerLine::Dotted) => {
            // cannot read nor write the data from this RAP temporarily (borrowed away by a mut reference)
            "".to_owned()
        }
        (State::PartialPrivilege{..}, _) => {
            data.line_class = String::from("solid");
            registry.render("vertical_line_template", &data).unwrap()
        },
        (State::OutOfScope, _) => (
            "".to_owned()
        ),
        // do nothing when the case is (RevokedPrivilege, false), (OutofScope, _), (ResourceMoved, false)
        (_, _) => (
            "".to_owned()
        ),
    }
}
fn create_owner_line_string ( rap : & ResourceAccessPoint , state : & State , data : & mut VerticalLineData , registry : & Handlebars , ) -> String { let style = determine_owner_line_styles ( rap , state ) ; match ( state , style ) { ( State :: FullPrivilege , OwnerLine :: Solid ) | ( State :: PartialPrivilege { .. } , OwnerLine :: Solid ) => { data . line_class = String :: from ( " " ) ; registry . render ( " " , & data ) . unwrap ( ) } , ( State :: FullPrivilege , OwnerLine :: Hollow ) => { // background for hollow line data . line_class = String :: from ( " " ) ; // overlap solid line with internal_line to create hollow effect let mut hollow_internal_line_data = data . clone ( ) ; hollow_internal_line_data . y1 += 5 ; hollow_internal_line_data . y2 -= 5 ; hollow_internal_line_data . title = data . title . to_owned ( ) ; let output = format ! ( " \n " registry render ( " " data ) unwrap ( ) registry render ( " " hollow_internal_line_data ) unwrap ( ) ) ; output } , ( State :: FullPrivilege , OwnerLine :: Dotted ) => { // cannot read nor write the data from this RAP temporarily (borrowed away by a mut reference) " " . to_owned ( ) } ( State :: PartialPrivilege { .. } , _ ) => { data . line_class = String :: from ( " " ) ; registry . render ( " " , & data ) . unwrap ( ) } , ( State :: OutOfScope , _ ) => ( " " . to_owned ( ) ) , // do nothing when the case is (RevokedPrivilege, false), (OutofScope, _), (ResourceMoved, false) ( _ , _ ) => ( " " . to_owned ( ) ) , } }
generate a Owner Line string from the RAP and its State
generate a Owner Line string from the RAP and its State
rap
&ResourceAccessPoint
state
&State
data
&mut VerticalLineData
registry
&Handlebars