Function parse_hyperlinks::renderer::links2html_writer
source · pub fn links2html_writer<'a, S: 'a + AsRef<str>, W: Write>(
input: S,
output: &mut W
) -> Result<(), Error>
Expand description
Hyperlink extractor
Same as links2html()
, but it uses Write
for output. This function
allocates much less memory and is faster because it avoids copying.
Usage example:
use parse_hyperlinks::renderer::links2html_writer;
use std::io;
use std::io::Read;
fn main() -> Result<(), ::std::io::Error> {
let mut stdin = String::new();
Read::read_to_string(&mut io::stdin(), &mut stdin)?;
links2html_writer(&stdin, &mut io::stdout())?;
Ok(())
}