### Example Usage Source: https://github.com/jmagnuson/linemux/blob/master/README.md This example demonstrates how to use the MuxedLines struct to tail multiple files asynchronously. ```rust use linemux::MuxedLines; #[tokio::main] async fn main() -> std::io::Result<()> { let mut lines = MuxedLines::new()?; // Register some files to be tailed, whether they currently exist or not. lines.add_file("some/file.log").await?; lines.add_file("/some/other/file.log").await?; // Wait for `Line` event, which contains the line captured for a given // source path. while let Ok(Some(line)) = lines.next_line().await { println!("source: {}, line: {}", line.source().display(), line.line()); } Ok(()) } ``` -------------------------------- ### Add linemux to your Cargo.toml Source: https://github.com/jmagnuson/linemux/blob/master/README.md This snippet shows how to add the linemux dependency to a Cargo.toml file. ```toml [dependencies] linemux = "0.3" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.