MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / inline

Method inline

css-inline/src/lib.rs:564–568  ·  view source on GitHub ↗
(&self, html: &str)

Source from the content-addressed store, hash-verified

562 /// using the same inliner panicked while resolving external stylesheets.
563 #[inline]
564 pub fn inline(&self, html: &str) -> Result<String> {
565 let mut out = allocate_output_buffer(html);
566 self.inline_to(html, &mut out)?;
567 Ok(String::from_utf8_lossy(&out).to_string())
568 }
569
570 /// Inline CSS & write the result to a generic writer. Use it if you want to write
571 /// the inlined document to a file.

Calls 2

allocate_output_bufferFunction · 0.85
inline_toMethod · 0.80