Function showata::show_file_in_jupyter [−][src]
pub fn show_file_in_jupyter<P: AsRef<Path>, S: AsRef<str>>(
path: P,
mime_type: S,
as_text: bool
) -> Result<(), Error>
Display the content of a local file.
use showata::*; use mime; show_file_in_jupyter("local-img.png", "image/png", false); show_file_in_jupyter("local-img.png", mime::IMAGE_PNG, false); show_file_in_jupyter("hello.html", "text/html", true); show_file_in_jupyter("hello.svg", mime::IMAGE_SVG, true);