[][src]Trait bookbinder_common::MimeTypeHelper

pub trait MimeTypeHelper {
    fn is_jpg(&self) -> bool;
fn is_png(&self) -> bool;
fn is_svg(&self) -> bool;
fn is_css(&self) -> bool;
fn is_opentype(&self) -> bool;
fn is_woff(&self) -> bool;
fn is_xhtml(&self) -> bool;
fn is_markdown(&self) -> bool;
fn is_tex_like(&self) -> bool;
fn is_eps(&self) -> bool;
fn is_gif(&self) -> bool;
fn is_pdf(&self) -> bool;
fn is_suitable_cover_background(&self) -> bool;
fn is_epub_supported_image(&self) -> bool;
fn is_latex_supported_image(&self) -> bool;
fn is_epub_supported_resource(&self) -> bool;
fn is_valid_logo_image(&self) -> bool; }

Various helpful functions for analysing filepaths

Required methods

fn is_jpg(&self) -> bool

is this likely to be a jpg file?

fn is_png(&self) -> bool

is this likely to be a png file?

fn is_svg(&self) -> bool

is this likely to be a svg file?

fn is_css(&self) -> bool

Is this likely to represent a css file?

fn is_opentype(&self) -> bool

Is this likely to represent an opentype font?

fn is_woff(&self) -> bool

Is this likely to represent a woff font?

fn is_xhtml(&self) -> bool

Is this likely to represent xhtml?

fn is_markdown(&self) -> bool

Is this likely to represent markdown?

fn is_tex_like(&self) -> bool

Is this likely to represent a tex or txt file?

fn is_eps(&self) -> bool

Is this likely to represent an eps file?

fn is_gif(&self) -> bool

Is this likely to represent a gif?

fn is_pdf(&self) -> bool

Is this likely to represent a pdf?

fn is_suitable_cover_background(&self) -> bool

Is this able to be incorporated as the background of a cover image? i.e. is png, jpg, or svg

fn is_epub_supported_image(&self) -> bool

Is this an image which epub supports? These are png, jpg, gif and svg

fn is_latex_supported_image(&self) -> bool

Is this likely to represent an image latex can render? These are pdf, png, jpg and eps

fn is_epub_supported_resource(&self) -> bool

Is this likely to represent a file which can be included in an epub? These are supported image formats, xhtml+xml, opentype, woff or css

fn is_valid_logo_image(&self) -> bool

can this be used as a publisher logo on the titlepage in both an epub and pdf?

Loading content...

Implementors

impl MimeTypeHelper for MimeType[src]

impl<T> MimeTypeHelper for T where
    T: GuessMimeType
[src]

Loading content...