Skip to main content

try_render_inline

Function try_render_inline 

Source
pub fn try_render_inline<F>(bytes: &[u8], env_lookup: F) -> Option<String>
where F: Fn(&str) -> Option<String>,
Expand description

Convenience entry that returns the kitty APC payload as a String when the bytes are a known image and the terminal supports kitty graphics, otherwise None. The caller falls back to the textual #u8(...) printer when this returns None.