pub(crate) fn add_value_to_str(&self, dst: &mut String,
                                   resources: Rc<Option<ResourceTable>>) {
        match self {
            Cell::Empty => dst.push(' '),
            Cell::Char(c) => dst.push(*c),
            Cell::ResourceId(id) => {
                if let Some(rt) = resources.as_ref() {
                    let content = &rt[id];
                    dst.push_str(&format!("{}{}", content, style::Reset));
                } else {
                    panic!(RESOURCE_TABLE_ERR_MSG);
                }
            },
            Cell::Content(content) => dst.push_str(&format!("{}{}", content, style::Reset))
        };
    }
// Add cell content to string.
Add cell content to string.
Add cell content to string .
pub(crate) fn add_value_to_str(&self, dst: &mut String,
                                   resources: Rc<Option<ResourceTable>>) {
        match self {
            Cell::Empty => dst.push(' '),
            Cell::Char(c) => dst.push(*c),
            Cell::ResourceId(id) => {
                if let Some(rt) = resources.as_ref() {
                    let content = &rt[id];
                    dst.push_str(&format!("{}{}", content, style::Reset));
                } else {
                    panic!(RESOURCE_TABLE_ERR_MSG);
                }
            },
            Cell::Content(content) => dst.push_str(&format!("{}{}", content, style::Reset))
        };
    }
pub ( crate ) fn add_value_to_str ( & self , dst : & mut String , resources : Rc < Option < ResourceTable > > ) { match self { Cell :: Empty => dst . push ( ' ' ) , Cell :: Char ( c ) => dst . push ( * c ) , Cell :: ResourceId ( id ) => { if let Some ( rt ) = resources . as_ref ( ) { let content = & rt [ id ] ; dst . push_str ( & format ! ( " " content style Reset ) ) ; } else { panic ! ( RESOURCE_TABLE_ERR_MSG ) ; } } , Cell :: Content ( content ) => dst . push_str ( & format ! ( " " content style Reset ) ) } ; }
Add cell content to string.
Add cell content to string .
&self
dst
&mut String
resources
Rc<Option<ResourceTable>>
&self
dst
&mut String
resources
Rc<Option<ResourceTable>>