[][src]Function alog::run

pub fn run(config: &Config, ioconfig: &IOConfig)

Creates a reader (defaults to std::io::Stdin) and writer (defaults to std::io::Stdout) from alog::IOConfig, passes both along with the alog::Config struct to actually replace any first word in reader with strings stored in alog::Config.

Errors

Exits when alog::IOConfig::get_output() already exists or the new reader / writer retruns an error.

Example

extern crate alog;

fn main() {
    alog::run(
        &alog::Config {
            host: "XXX",
            ..Default::default()
        },
        &alog::IOConfig::default()
    );
}