Function css_inline::inline_fragment_to
source · pub fn inline_fragment_to<W: Write>(
html: &str,
css: &str,
target: &mut W
) -> Result<()>
Expand description
Shortcut for inlining CSS into an HTML fragment with default parameters and writing the output to a generic writer.
§Errors
Inlining might fail for the following reasons:
- Missing stylesheet file;
- Remote stylesheet is not available;
- IO errors;
- Internal CSS selector parsing error;
§Panics
This function may panic if external stylesheet cache lock is poisoned, i.e. another thread using the same inliner panicked while resolving external stylesheets.